Skip to content
New issue

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

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

Already on GitHub? # to your account

Since Sass 1.43.4 @debug doesn't work with sass-loader >= 12.0.0 #1717

Closed
webdiscus opened this issue Jun 12, 2022 · 2 comments
Closed

Since Sass 1.43.4 @debug doesn't work with sass-loader >= 12.0.0 #1717

webdiscus opened this issue Jun 12, 2022 · 2 comments

Comments

@webdiscus
Copy link

webdiscus commented Jun 12, 2022

I have found the last version of Sass where works output of @debug, it is 1.43.3.
Since version 1.43.4 (up to 1.52.3) the @debug does not output to console.

The @warn and @error works.

Used:

  • webpack: 5.73.0
  • sass-loader: 13.0.0
  • node v16.13.1 (npm v8.1.2)
@nex3
Copy link
Contributor

nex3 commented Jun 13, 2022

Can you reproduce this without sass-loader?

@webdiscus webdiscus changed the title Since Sass 1.43.4 @debug doesn't work Since Sass 1.43.4 @debug doesn't work with Webpack Jun 13, 2022
@webdiscus
Copy link
Author

webdiscus commented Jun 13, 2022

@nex3

The Sass mostly is used with Webpack/sass-loader, therefore I have not tested Sass directly. But thank you for the tip ;-)
Yes, in all versions of Sass (inc. lastest 1.52.3) the @debug output works:

$color: red;
h1 {
    color: $color;
}
@debug '*** Color: #{$color}';

using the Sass API :

const sass = require('sass');

const result = sass.compile('style.scss');
console.log(result.css);

I have found the problem by sass-loader.
Very very confusing situation when @debug works:

  • Sass 1.52.3 + JS
  • Sass 1.52.3 + sass-loader 11.1.1
  • Sass 1.43.3 + sass-loader 13.0.0 (lastest)

Who broke compatibility, Sass since 1.43.4 or sass-loader since 12.0.0?
If the sass-loader is to blame, then why the latest version of sass-loader works with Sass <= 1.43.3?

P.S. I created new issue by sass-loader.

@webdiscus webdiscus changed the title Since Sass 1.43.4 @debug doesn't work with Webpack Since Sass 1.43.4 @debug doesn't work with sass-loader >= 12.0.0 Jun 13, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants