2017-11-15 07:51:53 +01:00
|
|
|
const webpack = require('webpack');
|
|
|
|
const WebpackDevServer = require('webpack-dev-server');
|
|
|
|
const config = require('./webpack.config.dev');
|
|
|
|
const opn = require('opn');
|
2016-03-15 23:42:10 +01:00
|
|
|
|
|
|
|
new WebpackDevServer(webpack(config), {
|
2016-09-15 22:04:15 +02:00
|
|
|
publicPath: config.output.publicPath,
|
|
|
|
historyApiFallback: true,
|
|
|
|
quiet: true, // lets WebpackDashboard do its thing
|
2017-11-15 07:51:53 +01:00
|
|
|
}).listen(3001, 'localhost', (err) => {
|
2016-09-15 22:04:15 +02:00
|
|
|
if (err) console.log(err);
|
2017-09-20 14:18:49 +02:00
|
|
|
opn('http://localhost:3001');
|
|
|
|
console.log('Listening at localhost:3001');
|
|
|
|
});
|