aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vnext/webpack.config.js13
1 files changed, 10 insertions, 3 deletions
diff --git a/vnext/webpack.config.js b/vnext/webpack.config.js
index f040c261..0adfa67e 100644
--- a/vnext/webpack.config.js
+++ b/vnext/webpack.config.js
@@ -8,7 +8,7 @@ const ErrorOverlayPlugin = require('error-overlay-webpack-plugin');
const dev = process.env.NODE_ENV !== 'production';
-module.exports = {
+const config = {
devtool: dev ? 'source-map' : false,
mode: dev ? 'development' : 'production',
entry: {
@@ -106,12 +106,19 @@ module.exports = {
template: './src/views/index.html',
filename: './index.html'
}),
- new webpack.HotModuleReplacementPlugin(),
new ErrorOverlayPlugin()
],
devServer: {
bonjour: true,
historyApiFallback: true,
- hot: true
+ hot: true,
+ inline: true
}
+};
+
+if (dev) {
+ config.plugins.push(new webpack.HotModuleReplacementPlugin())
}
+
+module.exports = config;
+