Skip to content

Commit 04c36d8

Browse files
committed
fix: plugin config is Array
1 parent 7257d9b commit 04c36d8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

config/plugin.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -329,10 +329,10 @@ exports.cssmini = {
329329
env: 'prod',
330330
type: 'client',
331331
name: 'optimize-css-assets-webpack-plugin'
332-
}
332+
};
333333

334334
exports.case = {
335335
enable: true,
336336
name: 'case-sensitive-paths-webpack-plugin',
337-
args:{}
337+
args: {}
338338
};

lib/base.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ class WebpackBaseBuilder extends Config {
117117
const configPlugin = sourcePlugins[name];
118118
if (target[name]) {
119119
// enable function 优先级高
120-
if (this.utils.isObject(configPlugin) && configPlugin.enable === undefined) {
120+
if ((this.utils.isObject(configPlugin) || Array.isArray(configPlugin)) && configPlugin.enable === undefined) {
121121
target[name].enable = true;
122122
}
123123
if (this.utils.isFunction(configPlugin.enable)) {

0 commit comments

Comments
 (0)