multpage-webpack-plugin

1.0.0-beta.0 • Public • Published

multpage-webpack-plugin

The default entry configuration information obtained from webpack-entry-util is configured to be applied to webpack html-webpack-plugin

Installation

Use the package manager npm to install multpage-webpack-plugin

npm install multpage-webpack-plugin

Usage

const entryUtil = require("webpack-entry-util");
const MultPageWebpackPlugin = require('multpage-webpack-plugin')
const entryConfig = entryUtil.getEntryFile();
const entry=entryConfig.reduce((cal, cur) => {
  const { name, entry } = cur;
  cal[name]=[entry]
})
const options={}
module.exports = {
  entry,
  plugins: [
    new MultPageWebpackPlugin(options,entryConfig)
  ]
}

Options

You can pass a hash of configuration options to MultPageWebpackPlugin. Allowed values are as follows

Name Type Default Description
options {Object} html-webpack-plugin option The options with html-webpack-plugin
entryConfig {{Array.<{entry:string, template?:string,template?:string, title?:string, chunks?:string}>}} [{entry:'src/index.js',name:"main",template:'public/index.html'}] webpack-entry-util returned result set

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i multpage-webpack-plugin

Weekly Downloads

3

Version

1.0.0-beta.0

License

ISC

Unpacked Size

2.18 kB

Total Files

3

Last publish

Collaborators

  • kangjy