egoist / egoist/rollup-plugin-postcss

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

Open
#425 0 comments 3 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
689
Forks
210
PR merge metrics
No merged PRs in 30d

Description

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?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.