-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
feat: CSS modules (early experimental support) #2489
Conversation
a6ffd5b
to
21e6f0d
Compare
df2175c
to
c01f9ff
Compare
924cff8
to
0e9ee7d
Compare
@chaance It seems like we have some conflicts to resolve here |
@chaance just letting you know, I've been testing this in a PoC we're running and found out the for example, if the source css has the following code
usually with parcel, which I think remix uses for css modules, it gets compiled to something like this
however in this remix implementation I currently run into something like this, where
|
The |
thanks @devongovett! that seems to work idd. It's odd because I tested it with Parcel 2 and it did seem to compile correctly with just |
Yes, Parcel 2 falls back to postcss-modules when it detects legacy syntax for backward compatibility. |
code: source, | ||
cssModules: true, | ||
minify: process.env.NODE_ENV === "production", | ||
analyzeDependencies: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chaance @devongovett when I use the url()
function, the value in the url()
gets hashed but never replaced again with the final result.
input
.container {
background-image: url(https://images.unsplash.com/photo-1593288942460-e321b92a6cde)
}
output
.layout-module___9D6bia_container {
background-image: url(mHxWpW);
}
This is because analyzeDependencies
is set to true
here but there is no process to replace those hashes with the actual results. more info
Does it need to be enabled? if so, we need to add a process to replace the hashes with the final urls again.
any updates on this? 🙂 |
@wingleung This is on hold as we're working on some bigger compiler updates that may impact our implementation quite a bit. I'm working on a public roadmap for this and other work to provide some transparency here. |
To anyone landing on this page, active work is happening here... |
Closing in favor of #4852 |
Hi