Skip to content

Commit

Permalink
Parallelize inject-babel-helpers plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
Arthi Ravi Shankar committed Jul 28, 2020
1 parent a670fc8 commit ab33e5d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ module.exports = {
// We want to enable async/generator helpers if we are developing locally,
// but not for any other project.
let isEmberSource = this.project.name() === 'ember-source';
let babelHelperPlugin = injectBabelHelpers(isEmberSource);
let babelHelperPlugin = injectBabelHelpers(isEmberSource);

let options = {
'ember-cli-babel': {
Expand Down
7 changes: 3 additions & 4 deletions lib/transforms/inject-babel-helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@
const { addNamed } = require('@babel/helper-module-imports');

function injectBabelHelpers(isEmberSource = false) {

let helperplugin = injectBabelHelpersPlugin;
helperplugin._parallelBabel = {
requireFile: __filename,
buildUsing: 'injectBabelHelpersPlugin',
params : { isEmberSource },
};
params: { isEmberSource },
};

helperplugin.baseDir = function() {
return 'babel-core';
Expand Down Expand Up @@ -38,5 +37,5 @@ function injectBabelHelpersPlugin(isEmberSource) {

module.exports = {
injectBabelHelpers,
injectBabelHelpersPlugin
injectBabelHelpersPlugin,
};

0 comments on commit ab33e5d

Please sign in to comment.