Commit d5b5f86
committed
fix(@angular/build): use stable worker filenames during dev server to prevent hash changes on rebuild
During `ng serve`, web workers were always bundled with `entryNames: 'worker-[hash]'`
regardless of whether the parent build used hashing. Combined with inherited `footer`
and `splitting` options from the parent build that could change between rebuilds, this
caused the worker filename hash to change on every rebuild even when the worker content
was unchanged, breaking debugging sessions.
The fix conditionally uses `worker-[hash]` only when the parent build uses hashing
(production builds), and `worker-[name]` otherwise (dev server). It also explicitly
sets `splitting: false` and `footer: undefined` in the worker build to prevent
non-deterministic output that could affect hashing.
Closes #304941 parent 7fbc715 commit d5b5f86
File tree
3 files changed
+19
-4
lines changed- packages/angular/build/src
- builders/application/tests/behavior
- tools/esbuild/angular
3 files changed
+19
-4
lines changedLines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | | - | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | | - | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
Lines changed: 15 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
286 | 286 | | |
287 | 287 | | |
288 | 288 | | |
| 289 | + | |
289 | 290 | | |
290 | | - | |
| 291 | + | |
291 | 292 | | |
292 | 293 | | |
293 | 294 | | |
| |||
763 | 764 | | |
764 | 765 | | |
765 | 766 | | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
766 | 774 | | |
767 | 775 | | |
768 | 776 | | |
769 | 777 | | |
770 | 778 | | |
771 | 779 | | |
772 | 780 | | |
773 | | - | |
| 781 | + | |
774 | 782 | | |
775 | 783 | | |
776 | 784 | | |
777 | 785 | | |
778 | 786 | | |
779 | 787 | | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
780 | 793 | | |
781 | 794 | | |
782 | 795 | | |
| |||
0 commit comments