-
Notifications
You must be signed in to change notification settings - Fork 607
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
[gulp-core-build-sass] Consider dart-sass instead of node-sass #1666
Comments
Performance is a major concern for How much slower is |
There are no bugs I have encountered, but there are missing features (such as the new In terms of performance, the |
From SPFx side, I am investigating potential regression of token interpolation: SharePoint/sp-dev-docs#5131. As well as a long-standing bug with current build implementation where shorthand properties are not interpolated properly. I will report back if |
@KevinTCoughlin I was always under the impression the token as in theme token interpolation not part of the SASS build. Instead it just integrates the strings. |
An update to this: the |
Pls think of replacing node-sass with dart-sass, as new features are and will not be implemented in node-sass anymore. This is already true for "@use", which is the recommendation to use instead of "@import" for various reasons (and "@import" import is deprecated as well). |
Currently
gulp-core-build-sass
uses thenode-sass
package. This has a few disadvantages compared todart-sass
(or the nodesass
package built from it):dart-sass
is the primary Sass implementation. This means it recieves fixes and features often a long time beforelibsass
and subsequentlynode-sass
.dart-sass
is a full JavaScript implementation.node-sass
has C++ bindings tolibsass
which have to be compiled. This meansnode-sass
has lower cross platform compatibility and is more prone to error when installing dependencies.dart-sass
should be almost entirely compatible with thenode-sass
API so very little work, if any, would be required.Due to the fact it is implemented in JS rather than C++,
dart-sass
is generally slower at compiling stylesheets. Personally I would rather the advantages of reliability and one less package with bindings over the slight extra compile time, however I believe this should be discussed.For clarity:
node-sass
is the currently shipped package, which has bindings to the C++ librarylibsass
.sass
is the node package built from the Dart packagedart-sass
.The text was updated successfully, but these errors were encountered: