Skip to content
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

Getting CSS Modules to work together with SASS - can we specify to only treat a particular format as a css module? #425

Open
mickeypuri opened this issue Jul 12, 2022 · 0 comments

Comments

@mickeypuri
Copy link

mickeypuri commented Jul 12, 2022

Our requirement is to generate a single css file from our .scss files without mangling of the css class names, but also to be able to use CSS Modules in particular custom components where we're expecting the css names to get managled. This is where it is falling over. We can either use SASS or CSS Modules, but not both together. When we switch on CSS Modules, then it also mangles all the .scss class names.

Have tried all configuration options but it either errors, or we mangle our sass classes as well as the css modules classes.

Is there any way of telling rollup-plugin-postcss to only process a particular file format e.g. *.module.css as a css module?

Also can we get the css modules to be inline ie export false, and yet have a single css file generated for the SASS ie export true?, ie can we specify separately how it treats scss files and how it treats css module files?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant