From a3f94e00a3fe202a93522bf397ac479b766cb3bb Mon Sep 17 00:00:00 2001 From: David da Silva Date: Thu, 28 Apr 2016 18:07:13 +0200 Subject: [PATCH] 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. --- lib/builder-browserify.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/builder-browserify.js b/lib/builder-browserify.js index b40ae16..36756da 100644 --- a/lib/builder-browserify.js +++ b/lib/builder-browserify.js @@ -39,7 +39,13 @@ function configure(bundler, cfg) { if (type === 'transform' && typeof o[type] === 'object') { bundler[type](o[type].name, _.omit(o[type], 'name')); } else { - bundler[type](o[type], _.omit(o, type)); + var values = o[type]; + if (!Array.isArray(values)) { + values = [values]; + } + values.forEach(function (value) { + bundler[type](value, _.omit(o, type)); + }); } } }