Мне нужно спросить, как объединить несколько htmlwebpackplugin кодов и написать более элегантный код.
Мне нужно решение, которое поможет мне каждый раз дублировать эту new HtmlWebpackPlugin({//..somecode})
часть кода.
new HtmlWebpackPlugin({
filename: "index.html",
template: "build/index.html",
hash: true,
chunks: ["index"]
}),
new HtmlWebpackPlugin({
filename:"footer.html",
template:"build/footer.html",
chunks:["footer"]
}),
new HtmlWebpackPlugin({
filename:"news.html",
template:"build/news.html",
chunks:["news"]
}),
new HtmlWebpackPlugin({
filename: "one-news.html",
template: "build/one-news.html",
chunks: ["oneNews"]
}),
new HtmlWebpackPlugin({
filename: "project.html",
template: "build/project.html",
chunks: ["project"]
}),
new HtmlWebpackPlugin({
filename: "about-us.html",
template: "build/about-us.html",
chunks: ["aboutUs"]
}),
new HtmlWebpackPlugin({
filename: "contact.html",
template: "build/contact.html",
chunks: ["contact"]
}),