Skip to content

Commit 7e00c02

Browse files
committed
fix(addon support): setting the '_allPodStyles' on the host application to hopefully avoid issues with multiple copys
1 parent 26542a8 commit 7e00c02

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

index.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ module.exports = {
6161
return projectRoot;
6262
},
6363

64-
_getEnvironment: function() {
64+
_getHostApp: function() {
6565
if (!this._findHost) {
6666
this._findHost = function findHostShim() {
6767
let current = this;
@@ -73,7 +73,11 @@ module.exports = {
7373
};
7474
}
7575

76-
return this._findHost().env;
76+
return this._findHost();
77+
},
78+
79+
_getEnvironment: function() {
80+
return this._getHostApp().env;
7781
},
7882

7983
included: function(app) {
@@ -86,6 +90,11 @@ module.exports = {
8690
this.parent.treeForParentAddonStyles = this.treeForParentAddonStyles.bind(this);
8791
}
8892

93+
var hostapp = this._getHostApp();
94+
if (!hostapp._allPodStyles) {
95+
hostapp._allPodStyles = [];
96+
}
97+
this._allPodStyles = hostapp._allPodStyles;
8998
this.appConfig = app.project.config(this._getEnvironment());
9099
this.addonConfig = this.appConfig['ember-component-css'] || {};
91100
this.classicStyleDir = this.addonConfig.classicStyleDir || 'component-styles';

0 commit comments

Comments
 (0)