我正在尝试缩小包含的HTML文件。我的模板看起来像这样:
<%- include ../header.html %>
<div class="container">
<h1><%- pageTitle %></h1>
</div>
<%- include( '/footer.html')%>
我的webpack配置是:
new HtmlWebpackPlugin({
filename: 'index.html',
template: 'src/index.html',
minify: {
removeComments: true,
collapseWhitespace: true,
conservativeCollapse: true
},
chunks: ['main']
}