Skip to content

Commit b39306d

Browse files
authored
Merge pull request #351 from typed-ember/babel-parallelizability
Ensure we don't break transpilation parallelizability
2 parents c12c411 + 3e281f2 commit b39306d

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

ember-cli-build.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ const EmberAddon = require('ember-cli/lib/broccoli/ember-addon');
44

55
module.exports = function(defaults) {
66
let app = new EmberAddon(defaults, {
7+
'ember-cli-babel': {
8+
throwUnlessParallelizable: true
9+
},
710
babel: {
811
sourceMaps: 'inline'
912
}

ts/addon.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import semver from 'semver';
22
import { Remote } from 'stagehand';
33
import { connect } from 'stagehand/lib/adapters/child-process';
4-
import { hasPlugin, addPlugin, AddPluginOptions } from 'ember-cli-babel-plugin-helpers';
4+
import { hasPlugin, addPlugin, AddPluginOptions, BabelPluginConfig } from 'ember-cli-babel-plugin-helpers';
55
import Addon from 'ember-cli/lib/models/addon';
66
import { addon } from './lib/utilities/ember-cli-entities';
77
import fork from './lib/utilities/fork';
@@ -109,7 +109,9 @@ export default addon({
109109
let target = this._getConfigurationTarget();
110110

111111
if (!hasPlugin(target, name)) {
112-
addPlugin(target, [require.resolve(name), config], constraints);
112+
let resolvedPath = require.resolve(name);
113+
let pluginEntry: BabelPluginConfig = config ? [resolvedPath, config] : resolvedPath;
114+
addPlugin(target, pluginEntry, constraints);
113115
}
114116
},
115117

0 commit comments

Comments
 (0)