使用HotModuleReplacement更改CSS时会更新,但是,我必须重新加载页面才能看到HTML更改:
entry: './src/index.js',
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'bundle.js',
},
devServer: {
contentBase: './dist',
compress: true,
open: true,
hot: true,
inline: true,
},