-
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
fix(@angular-devkit/build-angular): Sass compilation in StackBlitz webcontainers #22294
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That check looks good 👍
Thanks so much for this quick implementation and for adding an env check here for the time being. I am actually gonna look into this very soon so we can support |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just for context, do we only use dart-sass
for webcontainers, or are there other usages were it is still supported? I'm just wondering if this is the major thing blocking us from moving to node-sass
, or if there are other problems that need to be resolved anyways?
packages/angular_devkit/build_angular/src/webpack/configs/styles.ts
Outdated
Show resolved
Hide resolved
We only support dart-sass. |
Ah thanks, I was getting the direction of |
…bcontainers When `process.versions.webcontainer` is truthy it means that we are running in a StackBlitz webcontainer. `SassWorkerImplementation` uses `receiveMessageOnPort` Node.js `worker_thread` API to ensure sync behavior which is ~2x faster. However, it is non trivial to support this in a webcontainer and while slower we choose to use `dart-sass` which in Webpack uses the slower async path.
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. |
When
process.versions.webcontainer
is a string it means that we are running in a StackBlitz webcontainer.SassWorkerImplementation
usesreceiveMessageOnPort
Node.jsworker_thread
API to ensure sync behavior which is ~2x faster. However, it is non trivial to support this in a webcontainer and while slower we choose to usedart-sass
which in Webpack uses the slower async path.// cc @markwhitfeld