2017-05-03 02:04:16 +02:00
|
|
|
// Note: You must restart bin/webpack-dev-server for changes to take effect
|
|
|
|
|
2017-05-20 17:31:47 +02:00
|
|
|
const merge = require('webpack-merge');
|
|
|
|
const sharedConfig = require('./shared.js');
|
2017-06-18 02:57:09 +02:00
|
|
|
const { settings, output } = require('./configuration.js');
|
2017-05-03 02:04:16 +02:00
|
|
|
|
2017-10-04 09:52:11 +02: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-03 02:04:16 +02:00
|
|
|
module.exports = merge(sharedConfig, {
|
2018-07-14 03:56:41 +02:00
|
|
|
mode: 'development',
|
|
|
|
|
2017-05-07 15:22:30 +02:00
|
|
|
devtool: 'cheap-module-eval-source-map',
|
2017-05-03 02:04:16 +02:00
|
|
|
|
|
|
|
stats: {
|
2017-05-20 17:31:47 +02:00
|
|
|
errorDetails: true,
|
2017-05-03 02:04:16 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
output: {
|
2017-05-20 17:31:47 +02:00
|
|
|
pathinfo: true,
|
|
|
|
},
|
2017-06-18 02:57:09 +02: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 14:01:31 +02:00
|
|
|
disableHostCheck: true,
|
2017-10-04 09:52:11 +02:00
|
|
|
watchOptions: watchOptions,
|
2017-06-18 02:57:09 +02:00
|
|
|
},
|
2017-05-20 17:31:47 +02:00
|
|
|
});
|