Hello world!

Other Page

webpack.config.js

const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const HtmlWebpackPartialsPlugin = require('../../');

module.exports = {
  entry: {
    main: path.join(__dirname, './main.js')
  },
  output: {
    path: path.join(__dirname, './dist'),
    filename: '[name].js'
  },
  plugins: [
    new HtmlWebpackPlugin(),
    new HtmlWebpackPlugin({
      filename: 'other-page.html',
      template: path.join(__dirname, './other-page.html')
    }),
    new HtmlWebpackPartialsPlugin([
      {
        path: path.join(__dirname, './partials/body.html')
      },
      {
        path: path.join(__dirname, './partials/other-body.html'),
        template_filename: 'other-page.html'
      }
    ])
  ]
};

main.js

console.log('Test!');

other-page.html

<!DOCTYPE html>
<html>
<head></head>
<body>
</body>
</html>

partials/body.html

<h1>Hello world!</h1>
...and the rest of this configuration example

partials/other-body.html

<h1>Hello other world!</h1>