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

Switch from sass to sass-embedded #6526

Merged
merged 2 commits into from Jun 27, 2022
Merged

Switch from sass to sass-embedded #6526

merged 2 commits into from Jun 27, 2022

Conversation

aduth
Copy link
Member

@aduth aduth commented Jun 24, 2022

Previously: #5862 (comment)

Why: Improve performance of Sass compilation, using an official native Dart binary instead of the compiled-to-JavaScript sass implementation.

We had previously been blocked by sass/embedded-host-node#117, which was causing issues with downloading the binary in our build environments. This has since been resolved as of v1.53.0 (see changelog).

Performance Impact:

Average of 5 runs of yarn build:css:

Before: 9.9s
After: 4.4s

**Why**: Speeeeed 🏎

changelog: Internal, Build, Improve build performance of stylesheet compilation
@mitchellhenke
Copy link
Contributor

One question I had was whether this means the sass-embedded binary gets downloaded dynamically or if it gets installed as part of yarn install (and gets cached)?

@aduth
Copy link
Member Author

aduth commented Jun 24, 2022

One question I had was whether this means the sass-embedded binary gets downloaded dynamically or if it gets installed as part of yarn install (and gets cached)?

It's downloaded as a postinstall script of the package:

https://github.com/sass/embedded-host-node/blob/main/package.json#L25

I believe it would be downloaded into node_modules (node_modules/sass-embedded/lib/src/vendor/...), so it would be cached if we're caching node_modules ?

@mitchellhenke
Copy link
Contributor

One question I had was whether this means the sass-embedded binary gets downloaded dynamically or if it gets installed as part of yarn install (and gets cached)?

It's downloaded as a postinstall script of the package:

https://github.com/sass/embedded-host-node/blob/main/package.json#L25

I believe it would be downloaded into node_modules (node_modules/sass-embedded/lib/src/vendor/...), so it would be cached if we're caching node_modules ?

Yep, that's perfect!

@aduth aduth merged commit bbd5bb3 into main Jun 27, 2022
@aduth aduth deleted the aduth-sass-to-sass-embedded branch June 27, 2022 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants