andreivictor/webpack-tailwind-starter

how create multiple pages?

Closed this issue · 1 comments

how create multiple pages?

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.