Alan Agius 2c9a33dddb refactor(@angular-devkit/build-angular): ability to perform DCE but retain symbol names
Previously, we enabled the `keepNames` esbuild when mangling was disabled, this caused dead code to be retained because of the transformations that esbuild did to the input.

Input
```js
class foo {}
```

Output
```js
var l = Object.defineProperty,
  a = (s, c) => l(s, "name", { value: c, configurable: !0 });
class foo {}
a(foo, "foo");
```

Previously we enabled the `keepNames` esbuild option when mangling was disabled, which is actually not needed to retain the name of symbols but is needed for SSR because Domino relies on the `name` property on functions and classes.

Closes #22354
2021-12-17 13:30:52 +01:00
..
2021-11-04 12:16:49 -04:00

@angular-devkit/build-angular

This package contains Architect builders used to build and test Angular applications and libraries.

Builders

Name Description
app-shell Build an Angular App shell.
browser Build an Angular application targeting a browser environment.
dev-server A development server that provides live reloading.
extract-i18n Extract i18n messages from an Angular application.
karma Execute unit tests using Karma test runner.
ng-packagr Build and package an Angular library in Angular Package Format (APF) format using ng-packagr.
server Build an Angular application targeting a Node.js environment.
protractor Deprecated - Run end-to-end tests using Protractor framework.

Disclaimer

While the builders when executed via the Angular CLI and their associated options are considered stable, the programmatic APIs are not considered officially supported and are not subject to the breaking change guarantees of SemVer.