2.0.0 • Published 5 years ago

html-webpack-project-config-plugin v2.0.0

Weekly downloads
1
License
ISC
Repository
github
Last release
5 years ago

Generate project config for the HTMLWebpackPlugin

根据入口文件生成微前端所需的项目信息(入口文件及资源文件)

npm 更新版本和发布

1、使用 npm version 更新版本号

npm version [<newversion> | major | minor | patch

2、Run npm publish.

Installation

You must be running webpack on node 6.4 or higher

Install the plugin with npm:

$ npm install --save-dev html-webpack-project-config-plugin

Install the plugin with yarn:

$ yarn add --dev html-webpack-project-config-plugin

Basic Usage

Require the plugin in your webpack config:

var HtmlWebpackProjectConfigPlugin = require('html-webpack-project-config-plugin');

Add the plugin to your webpack config as follows:

{
	...
	plugins: [
	  new HtmlWebpackPlugin(),
	  new HtmlWebpackProjectConfigPlugin({
      outputPath: compilation.compiler.outputPath,
      config:projectConfig,
      configFilename:'project.json'
	  })
	]
	...
}

options: config

{
  name: "module1",
   path: ["/module1"],
   prefix: "/module1/",
}