diff --git a/config/webpack/development.js b/config/webpack/development.js index 830183c0d..12670f5cd 100644 --- a/config/webpack/development.js +++ b/config/webpack/development.js @@ -4,6 +4,17 @@ const merge = require('webpack-merge'); const sharedConfig = require('./shared.js'); const { settings, output } = require('./configuration.js'); +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; +} + module.exports = merge(sharedConfig, { devtool: 'cheap-module-eval-source-map', @@ -26,8 +37,6 @@ module.exports = merge(sharedConfig, { headers: { 'Access-Control-Allow-Origin': '*' }, historyApiFallback: true, disableHostCheck: true, - watchOptions: { - ignored: /node_modules/, - }, + watchOptions: watchOptions, }, });