ERROR in Template execution failed: ReferenceError: htmlPlugin is not defined這是什么原因
ERROR in Template execution failed: ReferenceError: htmlPlugin is not defined這是什么原因。模板語(yǔ)法不能用嗎? 代碼如下:
<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=""></%=>
2018-06-11
<%= htmlWebpackPlugin.options.title %>
2018-06-10
你這個(gè)問(wèn)題解決了么,我也有同樣的問(wèn)題呢
2018-04-20
模板中 htmlWebpack? 改為htmlWebpackPlugin