Skip to content

Commit

Permalink
Ensure vendor is transpiled.
Browse files Browse the repository at this point in the history
  • Loading branch information
rwjblue committed Dec 15, 2017
1 parent d47abd7 commit c4cc418
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
12 changes: 12 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,16 @@ module.exports = {
registry: this.registry,
});
},

treeForVendor(rawVendorTree) {
let babelAddon = this.addons.find(addon => addon.name === 'ember-cli-babel');

let transpiledVendorTree = babelAddon.transpileTree(rawVendorTree, {
'ember-cli-babel': {
compileModules: false,
},
});

return transpiledVendorTree;
},
};
8 changes: 4 additions & 4 deletions vendor/monkey-patches.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
/* globals require, Ember, jQuery */

(function() {
(() => {
if (typeof jQuery !== 'undefined') {
var _Ember;
let _Ember;
if (typeof Ember !== 'undefined') {
_Ember = Ember;
} else {
_Ember = require('ember').default;
}

var pendingRequests;
let pendingRequests;
if (Ember.__loader.registry['ember-testing/test/pending_requests']) {
pendingRequests = Ember.__loader.require('ember-testing/test/pending_requests');
}
Expand All @@ -27,7 +27,7 @@

pendingRequests.clearPendingRequests();

this._super.apply(this, arguments);
this._super.apply(...arguments);
},
});
}
Expand Down

0 comments on commit c4cc418

Please sign in to comment.