Skip to content
This repository has been archived by the owner on Nov 30, 2018. It is now read-only.

Use "ember-cli-import-polyfill" for import() call in "included" hook #7

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/* jshint node: true */
'use strict';

// Polyfill the Addon.import() method introduced by ember-cli@2.7.0
require('ember-cli-import-polyfill');

/*
* The `index.js` file is the main entry point for all Ember CLI addons. The
* object we export from this file is turned into an Addon class
Expand Down Expand Up @@ -33,8 +36,8 @@ module.exports = {
* which allows us to use the `import()` method to tell it to include a file
* from our `vendor` tree into the final built app.
*/
included: function(app) {
app.import('vendor/fetch.js');
included: function() {
this.import('vendor/fetch.js');
},

/*
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"broccoli-stew": "^1.0.4",
"broccoli-templater": "^1.0.0",
"ember-cli-babel": "^5.1.5",
"ember-cli-import-polyfill": "^0.1.0",
"node-fetch": "^1.3.3",
"whatwg-fetch": "^0.11.0"
},
Expand Down