I think it would be good to be able to specify the name of the output file from HTML plugin instead of the name of the template. This is useful when using the same template but injecting different chunks.
entry: {
index: './src/',
other: './src/other',
},
plugins: [
new HtmlWebpackPlugin({
title: 'Home',
template: './src/baseof.html',
filename: 'index.html',
chunks: ['index'],
}),
new HtmlWebpackPlugin({
title: 'Other',
template: './src/baseof.html',
filename: 'other.html',
chunks: [other'],
}),
new HtmlWebpackPartialsPlugin([
{
path: path.join(__dirname, './src/index_partial.html'),
priority: 'high',
location: 'main',
// template filename is not useful in this scenario
template_filename: 'index.html'
},
{
path: path.join(__dirname, './src/other_partial.html'),
priority: 'high',
location: 'main',
// using the name of the output file would be better
output_filename: 'other.html'
}
]),
],
Hi,
I think it would be good to be able to specify the name of the output file from HTML plugin instead of the name of the template. This is useful when using the same template but injecting different chunks.