-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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!: if not processed, CSS Modules return a proxy, scope class names by filename #1803
feat!: if not processed, CSS Modules return a proxy, scope class names by filename #1803
Conversation
4743748
to
29a4754
Compare
How about making This is what |
They are using This also changes semantics and requires different naming. |
Maybe enum
|
For my uses, the stability was the desired characteristic. If importing the stylesheet has the correct property string mapping, then |
Option
|
I am not familiar with CSS modules, so I'd trust your judgment here. Feel free to merge once you meet the agreement :) |
8385186
to
3b46df3
Compare
Closes #1512
This PR implements the following logic:
module.*
exports a proxy in that case to not affect runtime (meaning,styles.{value}
will always return a key with filename hash)css.include
), css is processed and injected into DOMmodule.*
returns pseudo-scoped class names (styles.module
always returns_module_${filenameHash}
,styles.someRandomValue
will returnundefined
)css.modules.classNameStrategy: 'scoped'
css.modules.classNameStrategy
option:scoped
- usecss.modules.generateScopeName
from user config or fallback to default behaviour, this is how it works in dev and prodnon-scoped
- returns just the namestable
- returns the nama and hash, based on filepath, relative to root