-
Notifications
You must be signed in to change notification settings - Fork 361
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
All CSS-files are treated as CSS Modules #653
Comments
It seems this is |
Thanks for the pointer to that issue. Just to clarify - the I think it may be possible to work around this using :global {
@import url('./index.css');
} In terms of a longer term fix: we should be able to use the undocumented Another approach would be to generate a regex for |
Yes, The workaround is suitable only for local files – we can't adjust third-party dependencies. Actually, I faced this issue initially with third-party CSS. IMO, the bug is pretty critical – it appeared in 0.12 and could break lots of projects. Clearly, |
Ah, I am mistaken about the workaround. It probably should work, thank you. |
Duplicate of #617 ;) |
@katywings the title is confusing, so I didn't get it's the same issue :( |
I can't believe this is still open, so css modules is still the only acceptable form of css if I use microbundle? @artemtam @katywings |
@FateRiddle yupp :/, and we are not alone: egoist/rollup-plugin-postcss#281 (comment) |
@FateRiddle This is an upstream bug in EDIT: On second thought: What if we disable CSS modules and only enable it for |
@marvinhagemeister it is not about Basically, in case you pass anything in |
@artemtam yup, that's what I was referring to. Sounds like an easy enough fix 🎉 |
This problem exists for me. When will the fix be made? |
@olgenn right above your comment are links to two PRs filed upstream to get this resolved. We will update microbundle once a fix is merged upstream. |
It should be fixed when #680 gets merged in. |
Not yet, will be fixed when #738 is merged. |
Hi Sorry, is this issue fixed ? Today I created a library using "create-react-library" and I'm having this error, is there any workaround ? I tried the :global { mentioned above, but not even sure where to put that Thank you |
The fix will be published in 0.13. |
Is there any additional step needed for |
@geocine Do you have a quick example repo showing what you try to do? 🙂 |
still doesn't work if you're changing the css-modules naming convention (e.g. |
still doesnt work. the problem is I want to support both by distctioning the name containing "module". any workaround? |
the best solution for me was to get rid of microbundle. it's been two years so this is obviously not going to be fixed. |
That's the proper solution. We mainly wrote |
Regardless
--css-modules
flag, it is impossible to use CSS and CSS Modules in the same project. It seems thatnull
option works incorrectly and Rollup treats all CSS files as modules.To reproduce, you could try to build this simple example:
Building with
microbundle ./index.jsx
makes the followingindex.css
file:However, the expected result is:
The text was updated successfully, but these errors were encountered: