sean5120scan
2018-04-20 17:25
ERROR in Template execution failed: ReferenceError: htmlPlugin is not defined这是什么原因。模板语法不能用吗? 代码如下:
<head>
<title><%= htmlPlugin.options.title %></title>
<meta charset="UTF-8" />
<script src="<%= htmlPlugin.files.chunks.main.entry %>"></script>
</head>
-----------------------------
plugins:[
new htmlPlugin({
template:"index.html",
filename:"index.html",
inject:"head",
title:"this is a.html",
chunks:["a"]
}),
new htmlPlugin({
template:"index.html",
filename:"index.html",
inject:"head",
title:"this is b.html",
chunks:["b"]
}),
new htmlPlugin({
template:"index.html",
filename:"index.html",
inject:"head",
title:"this is c.html",
chunks:["c"]
}),
]
<%= htmlplugin.options.title=""></%=><%= htmlWebpackPlugin.options.title %>
你这个问题解决了么,我也有同样的问题呢
模板中 htmlWebpack 改为htmlWebpackPlugin
webpack深入与实战
86561 学习 · 721 问题
相似问题