how create multiple pages?
Closed this issue · 1 comments
tiwka19 commented
how create multiple pages?
andreivictor commented
To generate multiple pages: create html files in src
folder, then declare the html-webpack-plugin
for each html file in your plugins array:
plugins: [
new HtmlWebpackPlugin({
template: `${paths.src}/index.html`,
filename: 'index.html',
title: 'Index | Webpack Starter',
}),
new HtmlWebpackPlugin({
template: `${paths.src}/about.html`,
filename: 'about.html',
title: 'About | Webpack Starter',
}),
HTML Webpack Plugin documentation:
https://github.com/jantimon/html-webpack-plugin#generating-multiple-html-files.