Why the page is hard-reloading once I change the code? or why it didn't use the hot-reload instead of hard-reload? Is anything wrong with the HotModuleReplacementPlugin?
let serverConfig = {
watchOptions:{
aggregateTimeout: 300, //delay
poll: 1000, // Poling interval
},
hot: true,
inline: true,
historyApiFallback: true,
compress: true,
disableHostCheck: true,
staticOptions: {
},
stats: { colors: true },
contentBase: '../build/',
publicPath: webpackConfig.output.publicPath,
headers: {
'X-Custom-Header': 'yes'
},
proxy: {
'/**': {
target: '/index.html',
secure: false,
bypass: function (req, res, proxyOptions) {
if (req.path=='/config') {
return res.json(_config.runtime)
}
return '/'
}
}
},
}