Create separate servers and configs for dev and prod

This commit is contained in:
2016-12-21 21:54:22 -07:00
parent 99443e25de
commit dd1e32ba0b
4 changed files with 75 additions and 11 deletions
+16
View File
@@ -0,0 +1,16 @@
var webpack = require('webpack');
var WebpackDevServer = require('webpack-dev-server');
var config = require('./webpack.config');
new WebpackDevServer(webpack(config), {
publicPath: config.output.publicPath,
hot: true,
historyApiFallback: true,
noInfo: true
}).listen(3000, 'localhost', function (err, result) {
if (err) {
console.log(err);
}
console.log('Listening at localhost:3000');
});