<commit_before># webpack-multi-entry-resolve
webpack多入口文件处理

## Getting Started

```shell
npm install webpack-multi-entry-resolve --save-dev
```

__examples__

```js
//webpack.config.js

var $fs = require('fs');
var $path = require('path');

var $webpack = require('webpack');
var $webpackMultiEntryResolve = require('webpack-multi-entry-resolve');

var root = $path.resolve(__dirname);

var webpackConfig = {
	entry: {},
	output: {
		path: $path.join(root, 'dist'),
		publicPath: '',
		filename: 'js/[name].js',
		chunkFilename: 'js/chunk/[id].chunk.js'
	},
	module: {
		loaders: []
	},
	plugins: []
};

$webpackMultiEntryResolve(webpackConfig, {
	root: root,
	path: $path.join(root, 'entry'),
	globs: '**/*.js'
});

module.exports = webpackConfig;

```

## options

#### options.debug

Type: `Boolean`

Default: false

是否为调试模式，开启调试模式会在控制台输出流程数据

#### options.root

Type: `String`

Default: process.cwd()

项目打包目录根路径

#### options.path

Type: `String` __required__

Default: 'entry'

项目打包入口文件夹路径

#### options.globs

Type: `String` | `Array`

Default: '**/*.js'

项目打包入口文件选择器，参见 walk-sync 的 globs 选项

#### options.global

Type: `Array`

Default: []

公共文件 entry 名称，会插入到 htmlWebpackPlugin.options.chunks

#### options.html

Type: `Object`

html模板文件选项，用于配置htmlWebpackPlugin

html模板文件和入口文件，其相对path的路径应该一一对应

```js<commit_msg>update docs.<commit_after># webpack-multi-entry-resolve
webpack多入口文件处理

## Getting Started

```shell
npm install webpack-multi-entry-resolve --save-dev
```

__examples__

```js
//webpack.config.js

var $fs = require('fs');
var $path = require('path');

var $webpack = require('webpack');
var $webpackMultiEntryResolve = require('webpack-multi-entry-resolve');

var root = $path.resolve(__dirname);

var webpackConfig = {
	entry: {},
	output: {
		path: $path.join(root, 'dist'),
		publicPath: '',
		filename: 'js/[name].js',
		chunkFilename: 'js/chunk/[id].chunk.js'
	},
	module: {
		loaders: []
	},
	plugins: []
};

$webpackMultiEntryResolve(webpackConfig, {
	root: root,
	path: $path.join(root, 'entry'),
	globs: '**/*.js'
});

module.exports = webpackConfig;

```

## options

#### options.debug

Type: `Boolean`

Default: false

是否为调试模式，开启调试模式会在控制台输出流程数据

#### options.root

Type: `String`

Default: process.cwd()

项目打包目录根路径

#### options.path (__required__)

Type: `String`

Default: 'entry'

项目打包入口文件夹路径

#### options.globs

Type: `String` | `Array`

Default: '**/*.js'

项目打包入口文件选择器，参见 walk-sync 的 globs 选项

#### options.global

Type: `Array`

Default: []

公共文件 entry 名称，会插入到 htmlWebpackPlugin.options.chunks

#### options.html

Type: `Object`

html模板文件选项，用于配置htmlWebpackPlugin

html模板文件和入口文件，其相对path的路径应该一一对应

```js
{'fraction_non_alphanumeric': 0.17682695948504354, 'fraction_numerical': 0.0, 'mean_word_length': 4.85809312638581, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6969863', 'n_tokens_mistral': 1129, 'n_tokens_neox': 1159, 'n_words': 196}