title: What is the right way to configure multiple pages in Webpack?
body: <p>I'm trying to create a basic website using just Webpack. My purpose is to have a simple URL structure like example.com/about, example.com/contact.</p>
  
  <p>In Webpack, I can use HTMLWebpackPlugin, but I need to create an instance for every route. So, my question is: is there a way to simplify this?</p>
  
  <pre class="lang-js prettyprint-override"><code>const path = require('path');
  const htmlWebpackPlugin = require('html-webpack-plugin');
  
  module.exports = {
      entry: './src/main.js',
      output: {
          filename: 'bundle.js',
          path: path.resolve(__dirname, 'dist'),
      },
      devServer: {
          port: 5000,
      },
      plugins: [
          new htmlWebpackPlugin({
              title: 'Home',
              filename: 'index.html',
              template: './src/pages/home/index.html',
          }),
          new htmlWebpackPlugin({
              title: 'About',
              filename: 'about/index.html',
              template: './src/pages/about/index.html',
          }),
      ],
  };
  </code></pre>