Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What about the options.outputStyle parameter? #779

Closed
silversonicaxel opened this issue Nov 28, 2019 · 2 comments
Closed

What about the options.outputStyle parameter? #779

silversonicaxel opened this issue Nov 28, 2019 · 2 comments

Comments

@silversonicaxel
Copy link
Contributor

I upgraded the sass-loader from version 7.1.0 to version 8.0.0

The webpack configuration was the following (sass loader 7.1.0)

       {
        loader: 'sass-loader',
        options: {
          outputStyle: 'compressed',
          sourceMap: true
        }
      }

After migrating I have this issue:

ValidationError: Invalid options object. Sass Loader has been initialised using an options object that does not match the API schema.
[build:css] [build:css:MYTHEME]  - options has an unknown property 'outputStyle'. These properties are valid:
[build:css] [build:css:MYTHEME]    object { implementation?, sassOptions?, prependData?, sourceMap?, webpackImporter? }

I was wondering what should be the new configuration (sass loader 8.0.0)

       {
        loader: 'sass-loader',
        options: {
          sassOptions: {
            outputStyle: 'compressed'
          }
          sourceMap: true
        }
      }

If that's correct, I would be more specific in the README at this comment

ℹ In some rare cases node-sass can output invalid source maps (it is a node-sass bug). In order to avoid this, you can try to update node-sass to latest version or you can try to set the outputStyle option to compressed.

@alexander-akait
Copy link
Member

Feel free to send a PR to docs

@silversonicaxel
Copy link
Contributor Author

Created here, thanks #780

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants