Commit fc5a2ec
committed
refactor(@angular/build): remove sass worker and fallback to pure-JS sass
Removes the legacy Piscina-based Sass worker thread pool implementation
(`sass-worker-implementation.ts` and `worker.ts`). When the native
`sass-embedded` compiler cannot be used (such as inside WebContainers or
when disabled), the build system now directly falls back to the in-process
pure-JS Dart Sass asynchronous compiler (`sass.initAsyncCompiler()`).
Consolidates the Sass compilation logic in `packages/angular/build/src/tools/sass`
into a simplified `SassCompiler` class in `sass-service.ts` supporting both
rebasing (esbuild) and non-rebasing (Webpack) usage.
Environment Variable:
- Replaces `NG_BUILD_SASS_WORKER` with `NG_BUILD_SASS_EMBEDDED`.
- When `NG_BUILD_SASS_EMBEDDED` is set to `0` or `false`, or when running
within a WebContainer environment, the native embedded Sass compiler is
disabled and the pure-JS Sass compiler is used instead.1 parent 9cebe22 commit fc5a2ec
9 files changed
Lines changed: 207 additions & 807 deletions
File tree
- packages
- angular_devkit/build_angular/src/tools/webpack/configs
- angular/build/src
- tools
- esbuild/stylesheets
- sass
- utils
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
Lines changed: 6 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | | - | |
| 13 | + | |
15 | 14 | | |
16 | 15 | | |
17 | 16 | | |
18 | | - | |
19 | | - | |
| 17 | + | |
| 18 | + | |
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
| |||
81 | 80 | | |
82 | 81 | | |
83 | 82 | | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
91 | 86 | | |
92 | 87 | | |
93 | 88 | | |
| |||
Lines changed: 6 additions & 41 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
49 | 51 | | |
50 | 52 | | |
51 | 53 | | |
| |||
140 | 142 | | |
141 | 143 | | |
142 | 144 | | |
| 145 | + | |
143 | 146 | | |
144 | 147 | | |
145 | 148 | | |
| |||
316 | 319 | | |
317 | 320 | | |
318 | 321 | | |
319 | | - | |
320 | | - | |
321 | | - | |
322 | | - | |
323 | | - | |
324 | | - | |
325 | | - | |
326 | | - | |
327 | | - | |
328 | | - | |
329 | | - | |
330 | | - | |
331 | | - | |
332 | | - | |
333 | | - | |
334 | | - | |
335 | | - | |
336 | | - | |
337 | | - | |
338 | | - | |
339 | | - | |
340 | | - | |
341 | | - | |
342 | | - | |
343 | | - | |
344 | | - | |
345 | | - | |
346 | 322 | | |
347 | 323 | | |
348 | 324 | | |
| |||
364 | 340 | | |
365 | 341 | | |
366 | 342 | | |
| 343 | + | |
| 344 | + | |
367 | 345 | | |
368 | 346 | | |
369 | 347 | | |
| |||
412 | 390 | | |
413 | 391 | | |
414 | 392 | | |
415 | | - | |
416 | | - | |
417 | | - | |
418 | | - | |
419 | | - | |
420 | | - | |
421 | | - | |
422 | | - | |
423 | | - | |
424 | | - | |
425 | | - | |
426 | | - | |
427 | | - | |
Lines changed: 0 additions & 182 deletions
This file was deleted.
0 commit comments