为什么更改代码后页面难以重新加载?或者为什么它没有使用热重载而不是硬重载? 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 '/'
}
}
},
}