Commit 8cdda11
committed
fix(@angular/build): resolve Angular locale data namespace in esbuild
A transient error can occur during `ng serve` when Vite's dependency pre-bundling is triggered for Angular locale data, showing an error like `[vite] (ssr) Error when evaluating SSR module...: There is a new version of the pre-bundle...`.
Previously, the `angular:locale/data:` namespace was left unresolved by the build process for the dev server. This caused Vite to treat the namespace as a new dependency, triggering a pre-bundling step that led to the error.
With this change, esbuild now resolves the `angular:locale/data:` namespace and replaces it with the direct module import path. While the module is still treated as an external dependency, providing the explicit path prevents Vite from unnecessarily triggering a new pre-bundling phase. This resolves the transient error.
Closes #31498
(cherry picked from commit c0c05174889967ba6e623ba40337f44ed1a1a219)1 parent ec2eb53 commit 8cdda11
File tree
4 files changed
+36
-84
lines changed- packages/angular/build/src
- builders/dev-server
- tools
- esbuild
- vite/plugins
4 files changed
+36
-84
lines changedLines changed: 0 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | 20 | | |
22 | 21 | | |
23 | 22 | | |
| |||
909 | 908 | | |
910 | 909 | | |
911 | 910 | | |
912 | | - | |
913 | 911 | | |
914 | 912 | | |
915 | 913 | | |
| |||
Lines changed: 36 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | 31 | | |
42 | 32 | | |
43 | 33 | | |
| |||
60 | 50 | | |
61 | 51 | | |
62 | 52 | | |
| 53 | + | |
63 | 54 | | |
64 | 55 | | |
65 | 56 | | |
| |||
73 | 64 | | |
74 | 65 | | |
75 | 66 | | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
81 | 100 | | |
82 | 101 | | |
83 | 102 | | |
| |||
Lines changed: 0 additions & 64 deletions
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | 10 | | |
12 | 11 | | |
13 | 12 | | |
0 commit comments