aboutsummaryrefslogtreecommitdiff
path: root/vnext/webpack.config.js
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-09-20 22:04:39 +0300
committerGravatar Vitaly Takmazov2023-01-13 10:37:53 +0300
commitfbc6d03158e9d35269aea9c791167a88b22b1e0b (patch)
treed143ad4872585b28accf48654623ad4e87617a06 /vnext/webpack.config.js
parentbec0aef574b7e92b7862bb5292238304429d10a1 (diff)
fix HMR
Diffstat (limited to 'vnext/webpack.config.js')
-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;
+