-
-
Notifications
You must be signed in to change notification settings - Fork 215
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
fix: allow module config while using autoModules (#281) #292
Conversation
Codecov Report
@@ Coverage Diff @@
## master #292 +/- ##
==========================================
+ Coverage 92.47% 92.50% +0.02%
==========================================
Files 10 10
Lines 319 320 +1
Branches 112 113 +1
==========================================
+ Hits 295 296 +1
Misses 23 23
Partials 1 1
Continue to review full report at Codecov.
|
97d2c17
to
5e5c5b7
Compare
this vs #291 ? |
The difference between this two solutions is that #291 requires the consumer to explicitly define autoModules = true if they seek to use autoModules and a custom modules config together. While the fix in this pr doesnt need any consumer changes. Imho with #291 it would be a little bit weird from a users standpoint:
|
Ah, understood |
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.
I like this change a lot because it changes the modules
flag to be more intended for specifying the naming scheme that is independent of whether autoModules
is used or everything should be a module. In my opinion that's the behavior a user would expect without looking at docs 👍
🎉 This PR is included in version 3.1.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
@katywings So if i wanna use Css modules and global css together i will have to do:
Doesn't work for me though, pure css files still get transformed into css module |
@YIZHUANG: Dont set modules: true. If you set modules to true then all files will be interpreted as modules. That was the case before and after this pr, this pr didnt change the behaviour of modules: true because that would have been a breaking change. Please look at the pr description, there is a comparison table with "IS" "SHOULD". If you think that modules: true should not result in all css files being interpreted as modules, then I recommend you to open a new issue with a change request :). |
This includes a fix for #281
Comparison of the options logic (IS / SHOULD columns):
I hope I didnt make any errors in the table LMAO