2017-05-23 21:51:04 +02:00
|
|
|
var config = require('./webpack.config.js');
|
2017-05-24 00:03:53 +02:00
|
|
|
var BundleTracker = require('webpack-bundle-tracker');
|
2017-07-16 21:14:03 +02:00
|
|
|
var webpack = require('webpack');
|
2017-05-23 21:51:04 +02:00
|
|
|
|
2017-05-25 01:44:58 +02:00
|
|
|
// Built webpack dev asset reloader
|
2017-07-16 21:14:03 +02:00
|
|
|
config.entry.common.unshift('webpack/hot/dev-server');
|
|
|
|
// Use 0.0.0.0 so that we can set a port but still use the host
|
|
|
|
// the browser is connected to.
|
|
|
|
config.entry.common.unshift('webpack-dev-server/client?http://0.0.0.0:9994');
|
|
|
|
|
2017-05-25 01:44:58 +02:00
|
|
|
// Out JS debugging tools
|
2017-06-22 22:48:25 +02:00
|
|
|
config.entry.common.push('./static/js/debug.js');
|
2017-05-25 01:44:58 +02:00
|
|
|
|
2017-05-23 21:51:04 +02:00
|
|
|
config.devtool = 'eval';
|
2017-05-31 06:58:01 +02:00
|
|
|
config.output.publicPath = '/webpack/';
|
2017-05-24 00:03:53 +02:00
|
|
|
config.plugins.push(new BundleTracker({filename: 'static/webpack-bundles/webpack-stats-dev.json'}));
|
2017-07-16 21:14:03 +02:00
|
|
|
// Hot Reload of code in development
|
|
|
|
config.plugins.push(new webpack.HotModuleReplacementPlugin());
|
|
|
|
// Better logging from console for hot reload
|
|
|
|
config.plugins.push(new webpack.NamedModulesPlugin());
|
2017-05-23 21:51:04 +02:00
|
|
|
|
|
|
|
config.devServer = {
|
2017-07-16 21:14:03 +02:00
|
|
|
clientLogLevel: "warning",
|
|
|
|
hot: true,
|
2017-05-31 06:58:01 +02:00
|
|
|
inline: false,
|
2017-05-23 21:51:04 +02:00
|
|
|
stats: "errors-only",
|
|
|
|
watchOptions: {
|
|
|
|
aggregateTimeout: 300,
|
|
|
|
poll: 1000,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
module.exports = config;
|