diff options
author | Mike Greiling <mike@pixelcog.com> | 2017-04-09 17:45:07 -0500 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2017-04-10 14:44:53 -0500 |
commit | 3812abfa23caac0512e74f3b47412645a5302b08 (patch) | |
tree | 357b8c2756eac0ee9422b8903d33647409c74442 /config | |
parent | 0b5a8a34e0b7851957b976a8151a7d6acf8b9f69 (diff) | |
download | gitlab-ce-3812abfa23caac0512e74f3b47412645a5302b08.tar.gz |
watch node_modules for changes when a module is missing
Diffstat (limited to 'config')
-rw-r--r-- | config/webpack.config.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/config/webpack.config.js b/config/webpack.config.js index 873c7b1d4ef..0fea3f8222b 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -6,6 +6,7 @@ var webpack = require('webpack'); var StatsPlugin = require('stats-webpack-plugin'); var CompressionPlugin = require('compression-webpack-plugin'); var BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin; +var WatchMissingNodeModulesPlugin = require('react-dev-utils/WatchMissingNodeModulesPlugin'); var ROOT_PATH = path.resolve(__dirname, '..'); var IS_PRODUCTION = process.env.NODE_ENV === 'production'; @@ -187,6 +188,10 @@ if (IS_DEV_SERVER) { inline: DEV_SERVER_LIVERELOAD }; config.output.publicPath = '//localhost:' + DEV_SERVER_PORT + config.output.publicPath; + config.plugins.push( + // watch node_modules for changes if we encounter a missing module compile error + new WatchMissingNodeModulesPlugin(path.join(ROOT_PATH, 'node_modules')) + ); } if (WEBPACK_REPORT) { |