Parcel not respecting cssnano config #1721
Labels
🐛 Bug
CSS Preprocessing
All the PostCSS, Less, SASS, etc issues
Stale Ignore
This issue is exempt from getting flagged as stale and autoremoved
🐛 bug report
I have my Sass .scss files which are compiled and then I run those through autoprefixer and cssnano. The problem is that when I do this, cssnano transforms expressions like
scale(1, 0)
toscaleY(0)
which causes issues in Safari. So I decided I'll just turn off thereduceTransforms
option in cssnano. However even though I have done this, after running Parcel I still get the same CSS with the transformation ofscale(1, 0)
toscaleY(0)
being done.🎛 Configuration (.babelrc, package.json, cli command)
My
postcss.config.js
:And to run parcel I am doing this CLI command:
🤔 Expected Behavior
As above, I am expecting
static/css/main.css
to not have this transformation being applied because in my config I have specifiedreduceTransforms: false
😯 Current Behavior
Instead, this transformation is being applied.
💁 Possible Solution
I'm not sure why this is happening. Intentionally putting invalid syntax in the postcss.config.js throws a syntax error when running parcel so it is definitely reading the postcss.config.js. Also it does look like autoprefixer is being run correctly so not sure why cssnano wouldn't.
This also doesn't happen when I pass the
--no-minify
flag but I do want minified output🔦 Context
I am statically generating CSS files from SASS which are placed in the server's static files directory so I can serve them. I want to minify the code but this cssnano optimization results in an animation of the
transform:
property not working in Safari.💻 Code Sample
Source code is this line:
and out I get:
🌍 Your Environment
other versions:
The text was updated successfully, but these errors were encountered: