rollup-plugin-postcss
rollup-plugin-postcss copied to clipboard
Getting CSS Modules to work together with SASS - can we specify to only treat a particular format as a css module?
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?