woshilyy
2018-08-02 15:42
htmlWebpackPlugin is undefined,一旦用了<%=%>就报这个错,不用的时候是可以运行的
plugins:[
new HtmlWebpackPlugin({
chunks:['index'], //添加引入的js,也就是entry中的key
hash:true, //向html引入的src链接后面增加一段hash值,消除缓存
title:'I love China',
template:'./dist/index.html'
})
]要定义这个plugin节点吧
webpack深入与实战
86554 学习 · 750 问题
相似问题