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

Replace node-sass with dart-sass -vnext #2561

Merged
merged 11 commits into from
Jul 29, 2021

Conversation

dobromirts
Copy link
Contributor

Closes #2558

@zdrawku
Copy link
Contributor

zdrawku commented Mar 31, 2021

46 minutes build time .. previously it was 8 :(
image

@simeonoff
Copy link
Collaborator

46 minutes build time .. previously it was 8 :(
image

Something must be very wrong. You can expect some slowdown if the build process uses some wrapper to call the dart sass binary, however, not in the scale of 5x. We must investigate further before we merge this PR.

dobromirts and others added 3 commits April 5, 2021 13:28
@dobromirts
Copy link
Contributor Author

After some research i found that, the the sass package on NPM is compiled to JS from Dart, so it has the same behavior as native Dart Sass (unlike the node-sass package, which is based on the deprecated libsass), just with a performance penalty due to running in JS (which shouldn't be a practical issue except for very large projects).
The pure JS version is slower than the stand-alone executable (https://sass-lang.com/dart-sass).
For projects that have a large codebase of sass files that need to be compiled and performance is important,
the DartVM executable version should be preferred or integrated in the project cli-issue.
The option to use the fast DartVM executable version of dart-sass, should be possible with this library
https://github.com/sass/embedded-host-node as mention also in here.

@dobromirts
Copy link
Contributor Author

The issue with the build time increase is also mentioned in angular/components#22676 , angular/angular-cli#20792.

@zdrawku zdrawku merged commit b60b0f9 into vNext Jul 29, 2021
@zdrawku zdrawku deleted the dTsvetkov/replace-node-sass-vnext branch July 29, 2021 08:23
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

Successfully merging this pull request may close these issues.

3 participants