Skip to content

Commit

Permalink
fix: plugin config is Array
Browse files Browse the repository at this point in the history
  • Loading branch information
hubcarl committed Oct 15, 2018
1 parent 7257d9b commit 04c36d8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions config/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -329,10 +329,10 @@ exports.cssmini = {
env: 'prod',
type: 'client',
name: 'optimize-css-assets-webpack-plugin'
}
};

exports.case = {
enable: true,
name: 'case-sensitive-paths-webpack-plugin',
args:{}
args: {}
};
2 changes: 1 addition & 1 deletion lib/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ class WebpackBaseBuilder extends Config {
const configPlugin = sourcePlugins[name];
if (target[name]) {
// enable function 优先级高
if (this.utils.isObject(configPlugin) && configPlugin.enable === undefined) {
if ((this.utils.isObject(configPlugin) || Array.isArray(configPlugin)) && configPlugin.enable === undefined) {
target[name].enable = true;
}
if (this.utils.isFunction(configPlugin.enable)) {
Expand Down

0 comments on commit 04c36d8

Please sign in to comment.