Skip to content

Commit

Permalink
Merge pull request #4328 from rwjblue/prevent-errors-with-fastboot
Browse files Browse the repository at this point in the history
[BUGFIX release] Only setup babel options once.
  • Loading branch information
fivetanley committed Apr 13, 2016
2 parents c2a0ca2 + 545f0a3 commit 1c7c737
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,23 @@ module.exports = {
]));
},

included: function(app) {
this._super.included.apply(this, arguments);
_setupBabelOptions() {
if (this._hasSetupBabelOptions) {
return;
}

this.options.babel = this.options.babel || {};
add(this.options.babel, 'blacklist', ['es6.modules', 'useStrict']);
add(this.options.babel, 'plugins', require('./lib/stripped-build-plugins')(process.env.EMBER_ENV));

this._hasSetupBabelOptions = true;
},

included: function(app) {
this._super.included.apply(this, arguments);

this._setupBabelOptions();

if (this._forceBowerUsage) {
this.app.import({
development: app.bowerDirectory + '/ember-data/ember-data.js',
Expand Down

0 comments on commit 1c7c737

Please sign in to comment.