Skip to content

Commit 0fccb03

Browse files
committed
allow splittable user to use additional plugins in the deps finding pipeline
this is needed as there are some constructs that the jison library generates that blows up with "use strict" directive. I need to be able to pass "transform-remove-strict-mode" plugin
1 parent fd84c97 commit 0fccb03

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

splittable.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,9 +238,10 @@ exports.getGraph = function(entryModules, config) {
238238
// directly and which we don't want to apply during deps finding.
239239
transform(babel, {
240240
babelrc: false,
241-
plugins: [
241+
plugins: Array.isArray(config.babel.plugins) ? config.babel.plugins.concat([
242242
require.resolve("babel-plugin-transform-es2015-modules-commonjs"),
243-
]
243+
]) : [require.resolve("babel-plugin-transform-es2015-modules-commonjs"),
244+
]
244245
});
245246

246247
b.on('package', function(pkg) {

0 commit comments

Comments
 (0)