-
Notifications
You must be signed in to change notification settings - Fork 12k
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
Make use of sass-embedded possible #23076
Comments
Hi @aersamkull, I did a number of benchmarks around using sass-embedded vs switching to dart-sass modern API and in the majority of cases sass-embedded didn't perform as well when used in the Angular CLI.
While sass-embedded did perform considerably better on large stylesheets such as style.scss, it performed poorly on smaller components stylesheets. The main reason for this is that sass-embedded starts and shutdowns the process for each compilation. More about this can be found in this issue. Below are some timings using the Sass modern API:
Sass-embeed also;
The biggest gain will be obtained by switching to Sass modern API. Once sass/sass#3296 is address we can re-evaluate sass-embedded. |
Closing as per above. You can track the progress on using the modern API in #23624. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Which @angular/* package(s) are relevant/related to the feature request?
compiler
Description
Hi there
Currently angular uses the
sass
package for compiling sass, which is of course fine. However it's not fast to compile sass this way, it's one of the pain parts we have in larger projects where we use things like bootstrap sassProposed solution
Sass-embedded is still experimental but offers the same API as sass and it's way faster. I had a project where build time went down by minutes by precompiling the sass and use the generated css in angular
I propose to add a feature flag to use sass-embedded
Alternatives considered
As mentioned I can preprocess my Sass outside Angular using sass-embedded, but it's not easy (had to create a fork of tilde-sass)
The text was updated successfully, but these errors were encountered: