Skip to content

Commit

Permalink
[BUGFIX release] don't load "app" code when loading globals files
Browse files Browse the repository at this point in the history
The code that gets compiled for the globals build is in a closure with
its own instance of `loader.js`, so the entries for ember-data don't end
up in ember-cli's instance of `loader.js`. The ember-data code does
include shims that end up in the app's instance of loader.js, so we
exclude the app code from running in this case.
  • Loading branch information
Stanley Stuart committed Jan 12, 2016
1 parent b731ebb commit a9ffe7f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ember-data",
"dependencies": {
"ember": "components/ember#release",
"ember": "components/ember#beta",
"ember-cli-shims": "ember-cli/ember-cli-shims#0.1.0",
"ember-cli-test-loader": "ember-cli-test-loader#0.1.3",
"ember-load-initializers": "ember-cli/ember-load-initializers#0.1.5",
Expand All @@ -13,6 +13,6 @@
"qunit": "~1.18.0"
},
"resolutions": {
"ember": "release"
"ember": "beta"
}
}
}
11 changes: 11 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,17 @@ module.exports = {
return path.join(__dirname, 'blueprints');
},

treeForApp: function(dir) {
if (this._forceBowerUsage) {
// Fake an empty broccoli tree
return { inputTree: dir, rebuild: function() { return []; } };
}

// this._super.treeForApp is undefined in ember-cli (1.13) for some reason.
// TODO: investigate why treeForApp isn't on _super
return dir;
},

treeForAddon: function(dir) {
if (this._forceBowerUsage) {
// Fakes an empty broccoli tree
Expand Down

0 comments on commit a9ffe7f

Please sign in to comment.