Skip to content

Commit

Permalink
Merge pull request #351 from typed-ember/babel-parallelizability
Browse files Browse the repository at this point in the history
Ensure we don't break transpilation parallelizability
  • Loading branch information
dfreeman authored Oct 26, 2018
2 parents c12c411 + 3e281f2 commit b39306d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 3 additions & 0 deletions ember-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ const EmberAddon = require('ember-cli/lib/broccoli/ember-addon');

module.exports = function(defaults) {
let app = new EmberAddon(defaults, {
'ember-cli-babel': {
throwUnlessParallelizable: true
},
babel: {
sourceMaps: 'inline'
}
Expand Down
6 changes: 4 additions & 2 deletions ts/addon.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import semver from 'semver';
import { Remote } from 'stagehand';
import { connect } from 'stagehand/lib/adapters/child-process';
import { hasPlugin, addPlugin, AddPluginOptions } from 'ember-cli-babel-plugin-helpers';
import { hasPlugin, addPlugin, AddPluginOptions, BabelPluginConfig } from 'ember-cli-babel-plugin-helpers';
import Addon from 'ember-cli/lib/models/addon';
import { addon } from './lib/utilities/ember-cli-entities';
import fork from './lib/utilities/fork';
Expand Down Expand Up @@ -109,7 +109,9 @@ export default addon({
let target = this._getConfigurationTarget();

if (!hasPlugin(target, name)) {
addPlugin(target, [require.resolve(name), config], constraints);
let resolvedPath = require.resolve(name);
let pluginEntry: BabelPluginConfig = config ? [resolvedPath, config] : resolvedPath;
addPlugin(target, pluginEntry, constraints);
}
},

Expand Down

0 comments on commit b39306d

Please sign in to comment.