From e01a244c93d4ad7d6fe0a72d18d1f3ae07f65b33 Mon Sep 17 00:00:00 2001 From: Jaimin Panchal Date: Tue, 18 Jun 2019 15:09:55 -0400 Subject: [PATCH] bundle all modules or only those which are passed --- gulpHelpers.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gulpHelpers.js b/gulpHelpers.js index f20a2673ade..6cc9c3bf016 100644 --- a/gulpHelpers.js +++ b/gulpHelpers.js @@ -71,7 +71,9 @@ module.exports = { if (fs.lstatSync(modulePath).isDirectory()) { modulePath = path.join(modulePath, 'index.js') } - memo[modulePath] = moduleName; + if ((externalModules.length > 0 && externalModules.includes(moduleName)) || externalModules.length === 0) { + memo[modulePath] = moduleName; + } return memo; }, {}); } catch (err) {