embroider-build / embroider

Compiling Ember apps into spec-compliant, modern Javascript.
MIT License
329 stars 137 forks source link

Ability to control order of addon implicit styles? #1862

Open raycohen opened 1 month ago

raycohen commented 1 month ago

In a classic build, my addons css was being concatenated into vendor.css in alphabetical order based on package name, which I think is a result of file system behavior once their individual processed css files are merged into a folder.

With embroider, I'm getting a very different order that I don't fully understand. I tried using package.json "ember-addon"."before"/"after" config which didn't seem to have any impact.

I have a very large monorepo with ~100 addons, so migrating fully off of implicit styles would be a large effort. But with the changed css order we've found issues where same-specificity rules changed order and a different one is taking precedence with embroider than with classic.

Is there any way to control the order that I'm missing?

ef4 commented 1 month ago

vendor.css is intended as a backward compatibility feature so if it's not producing the same order that's a bug.