Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace local-class with class at build time instead of runtime #284

Open
runspired opened this issue Jul 5, 2022 · 2 comments
Open

Replace local-class with class at build time instead of runtime #284

runspired opened this issue Jul 5, 2022 · 2 comments

Comments

@runspired
Copy link
Contributor

I may work on adding this feature, putting this out there to see what support there is for it. Basically a build-time only version ember-css-modules.

@scottmessinger
Copy link

I would love this.

@dfreeman
Copy link
Member

dfreeman commented Jul 19, 2022

I know @Turbo87 has expressed interest in this in the past as well.

I definitely see the appeal of doing all the work at build time, and would be super interested to see exploration in that space. If that's a route you want to explore, though, I'd strongly recommend not trying to build it on top of/into this package, but rather as something standalone. Maybe that's what you're suggesting?

Directionally I think where we're heading here is for ember-css-modules to ultimately go away, leaving behind:

ECM v3 will likely aim to be a bridge between that approach and how things work today to aid in migrating.

That will put us on more even footing with how most of the rest of the world consumes CSS Modules, and it would eliminate some of the runtime overhead we have for classname resolution today. That said, this would be a step away from us having any firsthand knowledge of or interaction with the name generation process, which I think you'd need tight coupling with in order to fully translate local-class to class at build time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants