Skip to content
This repository has been archived by the owner on Apr 16, 2024. It is now read-only.

UglifyJs => Terser #1018

Merged
merged 1 commit into from
Nov 16, 2018
Merged

UglifyJs => Terser #1018

merged 1 commit into from
Nov 16, 2018

Conversation

kesselb
Copy link
Contributor

@kesselb kesselb commented Nov 15, 2018

Description:

angular/angular-cli#5775 (comment)

Build could be faster when terser (https://www.npmjs.com/package/terser) is used instead of uglify-js.

Uglify-Js

image

Terser
image

Improvements

  • Faster build

@kesselb kesselb force-pushed the feature/replace-uglifyjs-terser branch from a30dba8 to bd365f9 Compare November 15, 2018 23:12
@kesselb
Copy link
Contributor Author

kesselb commented Nov 15, 2018

Uglify-Js

image

Terser
image

When build without sourcemaps there is no big difference but the build with sourcemaps should be faster.

Copy link
Collaborator

@PatrickSkowronek PatrickSkowronek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Due to this answer angular/angular-cli#5775 (comment) terser will be standard with angular 7. Why not upgrade angular to version 7?

@kesselb
Copy link
Contributor Author

kesselb commented Nov 16, 2018

Angular 7 is not on the roadmap (yet).

@PatrickSkowronek
Copy link
Collaborator

@danielkesselberg the upgrade should be not that problematic, like the update from 5->6

@kesselb
Copy link
Contributor Author

kesselb commented Nov 16, 2018

How is this related to this pr? Yes teser is default for angular 7 but I try to reduce the build time a bit and not upgrade angular. We will discuss the angular upgrade at some point but there is no need to rush. Angular 6 is supported until Nov 2019.

Copy link
Collaborator

@dboschm dboschm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@PatrickSkowronek upgrade to angular 7 is a risky thing and should be done prudently. Until then (as @danielkesselberg said angular 6 is not outdated til Nov 19) we want to save build time, and using terser with angular 6 is a simple way to save about 12-15%.

@kesselb kesselb merged commit 97b90b5 into develop Nov 16, 2018
@kesselb kesselb deleted the feature/replace-uglifyjs-terser branch November 16, 2018 13:55
@kesselb
Copy link
Contributor Author

kesselb commented Nov 18, 2018

Just for the record. Build is not faster on travis with terser.

Uglify-Js

image

Terser

image

This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants