webpack配置
new HtmlWebpackPlugin({
inject: true,
minify: {
ignoreCustomFragments: [ /\${[a-zA-Z]*?}/],
},
template: paths.appHtml
}),
html
<script>
var a="${a}";
var b="${b}";
</script>
报错
Template execution failed: ReferenceError: a is not defined
请问要怎么配置才能够让插件忽略${}
相关分类