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): prevent optimization adding unsup…
…ported ECMASCript features When optimization is enabled with the `@angular-devkit/build-angular:browser` builder, terser is used as a second phase optimizer. The terser configuration previously set its `ecma` option to `es2020` due to all officially supported browsers supporting the version. However, it is possible to add browsers to the browserslist configuration that are not officially supported that still may work but do not support es2020 syntax features. By setting the terser `ecma` option to `es2015`, terser will not turn existing syntax into newer syntax features that might be unsupported. Terser will also not downlevel any code based on this option. Fixes #24347 (cherry picked from commit ef99a68)
- Loading branch information