lahmatiy / postcss-csso

PostCSS plugin to minify CSS using CSSO

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

css modules @value #{$sass-variable} is being broken by postcss-csso

v-trof opened this issue · comments

CSSO process a CSS, not a Saas or whatever. So issue isn't related to CSSO or Saas.
As I know css-modules exposes class names and id only (keyframes or smth like that also maybe, but not sure). Saas variables shouldn't to be exposed, but may be because of saas-loader.
I don't know how your pipeline works in details and where is the problem. Believe it isn't because of CSSO. Plugin may be, but there is to low chance for it. Are you sure it's because of postcss-csso and Saas var should be exposed?

This is why I create this issue in postcss-csso and not csso itself.
For some reason presence of exactly postcss-csso causes the issue

Btw, postcss gets css files Before they are being passed to css loader => postcss-csso cuts this from a .css without any webpack specific changes

Yep, replicated without sass
@value #{} is being wiped. It is questionable, whether this can be taken for correct css syntax, but as for now everything works without postcss-csso.

Looks like the issue is related to #19 and fixed in 5.0.1