Skip to content

Commit

Permalink
fix: ScriptExtHtmlWebpackPlugin not use dll
Browse files Browse the repository at this point in the history
  • Loading branch information
hubcarl committed Nov 21, 2018
1 parent d36813e commit 32c5ca9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,13 @@ exports.getDllWebpackConfig = (config, option = {}) => {
const dll = WebpackDllBuilder.getDllConfig(config.dll);
const cli = utils.isObject(config.cli) ? config.cli : {};
const webpackConfigList = [];
const plugins = [];
if (cli.size) {
plugins.push(cli.size === true ? { analyzer: true } : { stats: true });
}
dll.forEach(item => {
const tmpConfig = utils.cloneDeep(config);
const dllConfig = merge(tmpConfig, { entry: null, dll: null }, { dll: item }, item.webpackConfig);
const dllConfig = merge(tmpConfig, { entry: null, dll: null, plugins }, { dll: item }, item.webpackConfig);
if (option.onlyView || cli.dll || utils.checkDllUpdate(config, item)) {
webpackConfigList.push(new WebpackDllBuilder(dllConfig).create());
}
Expand Down

0 comments on commit 32c5ca9

Please sign in to comment.