1.0.0-beta.0 • Published 5 years ago
multpage-webpack-plugin v1.0.0-beta.0
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 HtmlWebpackPlugin=require('html-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,HtmlWebpackPlugin)
]
}
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 |
htmlPlugin | HtmlWebpackPlugin | HtmlWebpackPlugin | html-webpack-plugin constructor |
License
1.0.0-beta.4
5 years ago
1.0.0-beta.3
5 years ago
1.0.0-beta.2
5 years ago
1.0.0-beta.1
5 years ago
1.0.0-beta.0
5 years ago