Skip to content

Commit 32c5ca9

Browse files
committed
fix: ScriptExtHtmlWebpackPlugin not use dll
1 parent d36813e commit 32c5ca9

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

lib/builder.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,13 @@ exports.getDllWebpackConfig = (config, option = {}) => {
8686
const dll = WebpackDllBuilder.getDllConfig(config.dll);
8787
const cli = utils.isObject(config.cli) ? config.cli : {};
8888
const webpackConfigList = [];
89+
const plugins = [];
90+
if (cli.size) {
91+
plugins.push(cli.size === true ? { analyzer: true } : { stats: true });
92+
}
8993
dll.forEach(item => {
9094
const tmpConfig = utils.cloneDeep(config);
91-
const dllConfig = merge(tmpConfig, { entry: null, dll: null }, { dll: item }, item.webpackConfig);
95+
const dllConfig = merge(tmpConfig, { entry: null, dll: null, plugins }, { dll: item }, item.webpackConfig);
9296
if (option.onlyView || cli.dll || utils.checkDllUpdate(config, item)) {
9397
webpackConfigList.push(new WebpackDllBuilder(dllConfig).create());
9498
}

0 commit comments

Comments
 (0)