Css module support is broken in 3.1.3
See original GitHub issueIn 3.1.2 docs example works, imports in js return correct objects.
postcss({
modules: true
})
In 3.1.3 same code imports return undefined
. From https://github.com/egoist/rollup-plugin-postcss/pull/292 there is new onlyModules
option I believe. Using it brings back correct objects.
postcss({
modules: true,
onlyModules: false
})
However, it’s a breaking change, this option is not documented and I have no idea if using it is a correct workaround.
Would be awesome to see official solution to this one 🙏
Issue Analytics
- State:
- Created 3 years ago
- Reactions:9
- Comments:8 (2 by maintainers)
Top Results From Across the Web
A complete guide to CSS Modules in React (Part-1) - codeburst
What if everything was running great and one day you decided to import a 3rd party library and everything broke due to CSS...
Read more >Internet explorer 11 & webpack V3 - doesn't bundle css ...
I'm working on a React\Redux project, bundled with webpack. After upgrading webpack V1 to V3, IE (11) support is broken, some of the...
Read more >Upgrade Guide - Tailwind CSS
Note that Tailwind CSS v3.0 requires PostCSS 8, and no longer supports PostCSS 7. ... module.exports = { purge: [ content: [ //...
Read more >css-loader | Yarn - Package Manager
css -loader. owner webpack-contrib95mMIT6.7.3 vulns 0 vulnerabilities. css loader module for webpack. webpack, css, loader, url ...
Read more >CSS Modules & Sass in Create React App | by Kirsten Swanson
json file and look how many dependencies you have! We're going to be adding some more to support the preprocessing of Sass (.scss...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ve same issue, set
autoModules: false
resolve my problem. My settings:Wow, it almost broke our release, good thing that tests caught this.
After upgrading to
4.0.0
our styles stopped being processed as CSS modules therefore returningundefined
to JS and emitting stylesheets without properly rewritten classnames. SettingautoModules
tofalse
helped it. By the way, we are not using.module
in our filenames.