Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(@angular-devkit/build-angular): only set ngDevMode when script op…
…timizations 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)
- Loading branch information