embroider-build / embroider

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

Can a compat app keep all of the unprocessed app/styles/ files? #1878

Open raycohen opened 1 month ago

raycohen commented 1 month ago

I have a legacy app building with embroider, but I needed to move my app/styles/ contents to another folder to be able to apply custom loaders to it, since the styles folder is excluded from the rewritten app.

At this point I'm not using the legacy app/styles/ behavior at all (I import the app-level styles from app.js), but I'd like to be able to keep my source files in app/styles/ to avoid the diffs from moving them to an arbitrary other folder name that isn't as good as "styles".

From https://github.com/embroider-build/embroider/issues/1033#issuecomment-982726689

... you couldn't keep your scss in app/styles -- that path gets enough legacy handling that it doesn't just flow through normally to where webpack can see it.

Basically the question is, do we want to prevent use of the app/styles/ folder for webpack-based use?

ef4 commented 1 month ago

I think it would be good to add a flag that disables the classic style pipeline for app/styles. It does not exist right now but it could.

We'd probably still want addons to be able to use the classic style pipeline even when the app opts out. That would be a separate flag for when you're sure no old addon needs it.