Skip to content
This repository was archived by the owner on Oct 10, 2021. It is now read-only.

Commit cfc092e

Browse files
committed
Support Arrays in browserify conf
`exclude` and `ignore` would not accept an Array of paths before, since `Browserify.prototype.exclude/ignore` was expecting a single file as argument.
1 parent 1a3391c commit cfc092e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/builder-browserify.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,11 @@ function configure(bundler, cfg) {
3939
if (type === 'transform' && typeof o[type] === 'object') {
4040
bundler[type](o[type].name, _.omit(o[type], 'name'));
4141
} else {
42-
bundler[type](o[type], _.omit(o, type));
42+
var values = o[type];
43+
if (!Array.isArray(values)) values = [values];
44+
values.forEach(function (value) {
45+
bundler[type](value, _.omit(o, type));
46+
});
4347
}
4448
}
4549
}

0 commit comments

Comments
 (0)