0.2.0 • Published 5 years ago

html-webpack-additional-template-plugin v0.2.0

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

html-webpack-additional-template-plugin

A plugin for setting multiple HTML template simply

Installation

npm install --save html-webpack-additional-template-plugin

Usage

webpack.config.js

const HtmlWebpackAdditionalTemplatePlugin = require('html-webpack-additional-template-plugin');

module.exports = {
  // ...
  plugins: [
    new HtmlWebpackPlugin({
      filename: 'index.html',
      template: './src/views/index.html',
      additionalTemplate: [
        {
          filename: 'about/index.html',
          template: './src/views/about.html'
        },
        {
          filename: 'contact/index.html',
          template: './src/views/contact.html'
        }
      ]
    }),
    new HtmlWebpackAdditionalTemplatePlugin(),
  ]
}