I'm trying to minify included HTML files. My templates looks like this:
<%- include ../header.html %>
<div class="container">
<h1><%- pageTitle %></h1>
</div>
<%- include( '/footer.html')%>
My webpack config is:
new HtmlWebpackPlugin({
filename: 'index.html',
template: 'src/index.html',
minify: {
removeComments: true,
collapseWhitespace: true,
conservativeCollapse: true
},
chunks: ['main']
}