Navigation Menu

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

fix: prioritize dart-sass over deprecated node-sass #402

Merged
merged 1 commit into from Nov 22, 2021

Conversation

dforesman
Copy link
Contributor

What does this do?

Prioritizes dart-sass (sass) over node-sass when both are available

Why?

node-sass is deprecated, as is its underlying LibSass.

Modern Sass features such as @use cannot and will not be supported by node-sass

In projects where both dependencies are available, this change will prevent the deprecated node-sass from running against modern SCSS code that may require dart-sass to compile.

While a configurable option for the preferred loader would be a more robust solution, it would require much more extensive changes to the plugin. This is a simple solution that will resolve the core problems experienced in issues #321 and #304, and involves minimal changes to the plugin code, leveraging the already-existing functionality of having a priority-ordered list of Sass modules.

@dforesman dforesman marked this pull request as ready for review September 29, 2021 20:13
@codecov
Copy link

codecov bot commented Sep 29, 2021

Codecov Report

Merging #402 (c464523) into master (118253e) will increase coverage by 0.30%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #402      +/-   ##
==========================================
+ Coverage   92.94%   93.25%   +0.30%     
==========================================
  Files          10       10              
  Lines         326      326              
  Branches      115      115              
==========================================
+ Hits          303      304       +1     
+ Misses         22       21       -1     
  Partials        1        1              
Impacted Files Coverage Δ
src/sass-loader.js 88.88% <100.00%> (ø)
src/utils/load-module.js 100.00% <0.00%> (+25.00%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 118253e...c464523. Read the comment docs.

@mistic100
Copy link

@egoist could this be released ?

@egoist egoist merged commit caf3429 into egoist:master Nov 22, 2021
@github-actions
Copy link

🎉 This PR is included in version 4.0.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@mistic100
Copy link

awesome

@advename
Copy link

advename commented Jan 9, 2022

Why hasn't this been added to the Docs yet, to install (dart) sass and not node-sass? Are there some incomplete underlying implementations?

@ckychris
Copy link

@dforesman This is a breaking change as our apps are using node-sass and have legacy syntaxes. Is there a quick toggle for us to prefer node-sass over sass? We also would love to consider using sass-embedded in the future, is it possible to choose a sass-implementation like https://www.npmjs.com/package/sass-loader?

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

Successfully merging this pull request may close these issues.

None yet

5 participants