Skip to content

Document outputStyle is set to compressed in production mode #1129

Closed
@thibaudcolas

Description

@thibaudcolas

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:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions