error - webpack - Cannot use [chunkhash] for chunk
error - webpack - Cannot use [chunkhash] for chunk
ERROR in chunk runtime [entry]
[name].[chunkhash].js
Cannot use [chunkhash] for chunk in '[name].[chunkhash].js' (use [hash] instead)
那你就把plugins里面的热替换插件注释掉就好了,上线的config不需要热替换:
plugins: [
//new hotModuleReplacementPlugin(),
]
vue.config.js
本地 production
启动
devServer: {
// 设置代理
hot: process.env.NODE_ENV === 'development', //热加载
......