Skip to content

Commit

Permalink
fix(build): generate app tree before merging
Browse files Browse the repository at this point in the history
This fixes an issue introduced in #1048 where the ember-uikit styles are
only available for the build of the host app, but not for addons which
also use ember-uikit (e.g.
projectcaluma/ember-caluma#2378).
  • Loading branch information
czosel committed Apr 18, 2023
1 parent afecc68 commit 242121c
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions index.js
Expand Up @@ -39,10 +39,9 @@ module.exports = {
destDir: "/assets/images/icons",
});

return this._super.treeForPublic.call(
this,
merge([uikitAssets, uikitIcons, tree].filter(Boolean))
);
const appTree = this._super.treeForPublic.call(this, tree);

return merge([uikitAssets, uikitIcons, appTree].filter(Boolean));
},

treeForStyles(tree) {
Expand All @@ -53,10 +52,9 @@ module.exports = {
destDir: "ember-uikit",
});

return this._super.treeForStyles.call(
this,
merge([uikitStyles, tree].filter(Boolean))
);
const appTree = this._super.treeForStyles.call(this, tree);

return merge([uikitStyles, appTree].filter(Boolean));
},

treeForVendor(tree) {
Expand All @@ -69,10 +67,9 @@ module.exports = {
(content) => `if (typeof FastBoot === 'undefined') { ${content} }`
);

return this._super.treeForVendor.call(
this,
merge([tree, uikitScripts].filter(Boolean))
);
const appTree = this._super.treeForVendor.call(this, tree);

return merge([appTree, uikitScripts].filter(Boolean));
},

included(...args) {
Expand Down

0 comments on commit 242121c

Please sign in to comment.