diff options
-rw-r--r-- | config/webpack.config.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/config/webpack.config.js b/config/webpack.config.js index f27b7cae310..2e8c94655c1 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -241,6 +241,7 @@ if (IS_DEV_SERVER) { port: DEV_SERVER_PORT, headers: { 'Access-Control-Allow-Origin': '*' }, stats: 'errors-only', + hot: DEV_SERVER_LIVERELOAD, inline: DEV_SERVER_LIVERELOAD }; config.output.publicPath = '//' + DEV_SERVER_HOST + ':' + DEV_SERVER_PORT + config.output.publicPath; @@ -248,6 +249,9 @@ if (IS_DEV_SERVER) { // watch node_modules for changes if we encounter a missing module compile error new WatchMissingNodeModulesPlugin(path.join(ROOT_PATH, 'node_modules')) ); + if (DEV_SERVER_LIVERELOAD) { + config.plugins.push(new webpack.HotModuleReplacementPlugin()); + } } if (WEBPACK_REPORT) { |