Commit cd02475
committed
fix(@angular-devkit/build-angular): preemptively remove AOT metadata in esbuild builder
The Angular compiler generates two types of metadata calls when it generates AOT code.
This metadata is not used in fully AOT compiled applications and can contain direct references
to components, services, etc. that may affect the output chunk layout of the application.
While this currently has not lead to any problems, it could in the future and the Webpack
bundler already performs a transform that preemptively removes these calls. To remain
consistent, the esbuild-based build system will now also perform this transform.
This also updates the autoprefixer behavior tests to check the actual runtime style text
instead of the style text within the metadata calls.
(cherry picked from commit c462d9c)1 parent 58bb392 commit cd02475
File tree
2 files changed
+16
-14
lines changed- packages/angular_devkit/build_angular/src/builders/browser-esbuild
- angular
- tests/behavior
2 files changed
+16
-14
lines changedLines changed: 9 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
23 | 26 | | |
24 | 27 | | |
25 | 28 | | |
| |||
153 | 156 | | |
154 | 157 | | |
155 | 158 | | |
156 | | - | |
157 | | - | |
158 | | - | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
159 | 164 | | |
160 | 165 | | |
161 | 166 | | |
| |||
Lines changed: 7 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
110 | | - | |
111 | | - | |
| 109 | + | |
112 | 110 | | |
113 | 111 | | |
114 | | - | |
| 112 | + | |
115 | 113 | | |
116 | 114 | | |
117 | 115 | | |
| |||
137 | 135 | | |
138 | 136 | | |
139 | 137 | | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
| 138 | + | |
| 139 | + | |
144 | 140 | | |
145 | 141 | | |
146 | 142 | | |
| |||
169 | 165 | | |
170 | 166 | | |
171 | 167 | | |
172 | | - | |
| 168 | + | |
| 169 | + | |
173 | 170 | | |
174 | 171 | | |
175 | 172 | | |
| |||
193 | 190 | | |
194 | 191 | | |
195 | 192 | | |
196 | | - | |
| 193 | + | |
197 | 194 | | |
198 | 195 | | |
199 | 196 | | |
0 commit comments