2017-05-02 17:04:16 -07:00
|
|
|
// Note: You must restart bin/webpack-dev-server for changes to take effect
|
|
|
|
|
2017-05-20 08:31:47 -07:00
|
|
|
const merge = require('webpack-merge');
|
|
|
|
const sharedConfig = require('./shared.js');
|
2017-06-17 17:57:09 -07:00
|
|
|
const { settings, output } = require('./configuration.js');
|
2017-05-02 17:04:16 -07:00
|
|
|
|
2017-10-04 00:52:11 -07:00
|
|
|
const watchOptions = {
|
|
|
|
ignored: /node_modules/,
|
|
|
|
};
|
|
|
|
|
|
|
|
if (process.env.VAGRANT) {
|
|
|
|
// If we are in Vagrant, we can't rely on inotify to update us with changed
|
|
|
|
// files, so we must poll instead. Here, we poll every second to see if
|
|
|
|
// anything has changed.
|
|
|
|
watchOptions.poll = 1000;
|
|
|
|
}
|
|
|
|
|
2017-05-02 17:04:16 -07:00
|
|
|
module.exports = merge(sharedConfig, {
|
2017-05-07 06:22:30 -07:00
|
|
|
devtool: 'cheap-module-eval-source-map',
|
2017-05-02 17:04:16 -07:00
|
|
|
|
|
|
|
stats: {
|
2017-05-20 08:31:47 -07:00
|
|
|
errorDetails: true,
|
2017-05-02 17:04:16 -07:00
|
|
|
},
|
|
|
|
|
|
|
|
output: {
|
2017-05-20 08:31:47 -07:00
|
|
|
pathinfo: true,
|
|
|
|
},
|
2017-06-17 17:57:09 -07:00
|
|
|
|
|
|
|
devServer: {
|
|
|
|
clientLogLevel: 'none',
|
|
|
|
https: settings.dev_server.https,
|
|
|
|
host: settings.dev_server.host,
|
|
|
|
port: settings.dev_server.port,
|
|
|
|
contentBase: output.path,
|
|
|
|
publicPath: output.publicPath,
|
|
|
|
compress: true,
|
|
|
|
headers: { 'Access-Control-Allow-Origin': '*' },
|
|
|
|
historyApiFallback: true,
|
2017-06-19 05:01:31 -07:00
|
|
|
disableHostCheck: true,
|
2017-10-04 00:52:11 -07:00
|
|
|
watchOptions: watchOptions,
|
2017-06-17 17:57:09 -07:00
|
|
|
},
|
2017-05-20 08:31:47 -07:00
|
|
|
});
|