Skip to content

docs: mention Terser instead of UglifyJS #12808

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/documentation/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ ng build --base-href /myUrl/
### Bundling & Tree-Shaking

All builds make use of bundling and limited tree-shaking, while `--prod` builds also run limited
dead code elimination via UglifyJS.
dead code elimination via Terser.

### `--build-optimizer` and `--vendor-chunk`

When using Build Optimizer the vendor chunk will be disabled by default.
You can override this with `--vendor-chunk=true`.

Total bundle sizes with Build Optimizer are smaller if there is no separate vendor chunk because
having vendor code in the same chunk as app code makes it possible for Uglify to remove more unused
having vendor code in the same chunk as app code makes it possible for Terser to remove more unused
code.

### CSS resources
Expand All @@ -57,7 +57,7 @@ You'll see these resources be outputted and fingerprinted at the root of `dist/`

To build in ES2015 mode, edit `./tsconfig.json` to use `"target": "es2015"` (instead of `es5`).

This will cause application TypeScript and Uglify be output as ES2015, and third party libraries
This will cause application TypeScript and Terser be output as ES2015, and third party libraries
to be loaded through the `es2015` entry in `package.json` if available.

Be aware that JIT does not support ES2015 and so you should build/serve your app with `--aot`.
Expand Down
2 changes: 1 addition & 1 deletion packages/angular_devkit/build_optimizer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Transformations applied depend on file content:
- [Import tslib](#import-tslib): applied when TypeScript helpers are found.

Some of these optimizations add `/*@__PURE__*/` comments.
These are used by [UglifyJS](https://github.com/mishoo/UglifyJS2) to identify pure functions that can potentially be dropped.
These are used by [Terser](https://github.com/terser-js/terser) to identify pure functions that can potentially be dropped.


### Class fold
Expand Down