Skip to content

Commit

Permalink
sort css by addon name
Browse files Browse the repository at this point in the history
  • Loading branch information
raycohen committed Nov 25, 2024
1 parent 0facb20 commit fc820d1
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion packages/compat/src/compat-app-builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,15 @@ export class CompatAppBuilder {

private impliedAddonAssets(type: keyof ImplicitAssetPaths, { engine }: AppFiles): string[] {
let result: Array<string> = [];
for (let addon of sortBy(Array.from(engine.addons), this.scriptPriority.bind(this))) {
let addons: Array<AddonPackage> = sortBy(Array.from(engine.addons), this.scriptPriority.bind(this));
if (type === 'implicit-styles') {
const synthesizedVendor = addons.find(pkg => pkg.name === '@embroider/synthesized-vendor');
if (synthesizedVendor) {
addons = sortBy(addons, pkg => pkg.name).filter(pkg => pkg !== synthesizedVendor);
addons.unshift(synthesizedVendor);
}
}
for (let addon of addons) {
let implicitScripts = addon.meta[type];
if (implicitScripts) {
let styles = [];
Expand Down

0 comments on commit fc820d1

Please sign in to comment.