Created
June 29, 2015 00:34
-
-
Save BlakeWilliams/2bbd5586b4256d94392a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var webpack = require('webpack'); | |
| var WebpackDevServer = require('webpack-dev-server'); | |
| var config = require('./webpack.config'); | |
| var port = 8000; | |
| config.entry.unshift("webpack-dev-server/client?http://localhost:" + port); | |
| config.entry.unshift("webpack/hot/dev-server"); | |
| config.plugins.push( | |
| new webpack.HotModuleReplacementPlugin() | |
| ); | |
| new WebpackDevServer(webpack(config), { | |
| contentBase: "./public", | |
| hot: true, | |
| historyApiFallback: true, | |
| noInfo: true, | |
| }).listen(port, 'localhost', function (err, result) { | |
| console.log('Listening at localhost:' + port); | |
| if (err) { | |
| console.log(err); | |
| } | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment