Description
Documentation Is:
- Missing
- Needed
- Confusing
- Not Sure?
Please Explain in Detail...
There is no documentation that the plugin configures Sass differently in development and production mode: setting the outputStyle
to compressed
in production, expanded
in development.
This is very unexpected for me and I was going to file this behavior as a bug but reading through #763 it seems to be intentional. This should be documented, so people who want to have the exact same output in both modes know how to configure sass-loader
.
Your Proposal for Changes
Either have a section about "production optimisations" mentioning this, or mention this where outputStyle
is documented.
This is very problematic for us because we’ve otherwise configured our styles to compile the exact same way in production and development (same as #763 (comment)). In this case, we noticed the discrepancy because we use PostCSS processing alongside Sass, and this processing can have incorrect handling of whitespace.
See for example:
- Incorrect parsing of calc operations without spaces in parentheses TrySound/postcss-value-parser#86
- Incorrect parsing of theme functions within calc operations without spaces tailwindlabs/tailwindcss#11027
- Cannot parse calculations without spaces around the * operator shellscape/postcss-values-parser#138