From fbc6d03158e9d35269aea9c791167a88b22b1e0b Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Thu, 20 Sep 2018 22:04:39 +0300 Subject: fix HMR --- vnext/webpack.config.js | 13 ++++++++++--- 1 file 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; + -- cgit v1.2.3