Commit 9fd3562
committed
fix(@angular-devkit/build-angular): only set ngDevMode when script optimizations are enabled
When using the experimental esbuild-based browser application builder, the `ngDevMode` global
runtime variable was unintentionally always being set to false due to a previous bug fix that stopped
the variable from being replaced with the value of true when script optimizations were disabled.
By doing so, the fix caused the imported compiler-cli `GLOBAL_DEFS_FOR_TERSER_WITH_AOT` constant
to take precedence which contains an `ngDevMode` value of false. To prevent this situation for
development builds where a non-false `ngDevMode` is helpful to surface potential runtime problems,
`GLOBAL_DEFS_FOR_TERSER_WITH_AOT` will no longer change the value of `ngDevMode`. This fix does not
have any effect on production builds since `ngDevMode` would have been set to false regardless.
(cherry picked from commit 310144d)1 parent ccc8e03 commit 9fd3562
File tree
2 files changed
+8
-0
lines changed- packages/angular_devkit/build_angular/src/builders/browser-esbuild
2 files changed
+8
-0
lines changedLines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
195 | 199 | | |
196 | 200 | | |
197 | 201 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
296 | 296 | | |
297 | 297 | | |
298 | 298 | | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
299 | 302 | | |
| 303 | + | |
300 | 304 | | |
301 | 305 | | |
302 | 306 | | |
| |||
0 commit comments