Skip to content
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

feat(@angular-devkit/build-angular): use terser instead of uglify-es #11996

Merged
merged 1 commit into from
Aug 27, 2018

Conversation

filipesilva
Copy link
Contributor

Should help bring down prod build times, @SanderElias reported a ~60% reduction on his project.

Should fix #9340.

Should help bring down prod build times, @SanderElias reported a ~60% reduction on his project.

Should fix angular#9340.
@filipesilva filipesilva added the target: major This PR is targeted for the next major release label Aug 24, 2018
@vikerman vikerman merged commit 907fedc into angular:master Aug 27, 2018
@filipesilva filipesilva deleted the terser-plugin branch August 27, 2018 17:29
@kzc
Copy link

kzc commented Aug 28, 2018

@filipesilva Terser has no known issues with the compress inline option with ES6+ code.

// Workaround known uglify-es issue
// See https://github.com/mishoo/UglifyJS2/issues/2949#issuecomment-368070307
inline: wco.supportES2015 ? 1 : 3,

This code can probably be removed.

@filipesilva
Copy link
Contributor Author

Thanks for the heads up @kzc, didn't remember that. Fix up at #12033

@kubbafox
Copy link

kubbafox commented Sep 6, 2018

@filipesilva Hi Filipe, may I ask when your team will release a new version which includes this PR? Thanks a lot :)

@filipesilva
Copy link
Contributor Author

@kubbafox this is now released in @angular-devkit/build-angular@0.9.0-beta.2.

@flash-me
Copy link

@filipesilva Is this an ng 7 only feature or can we expect to make use of it while remaining on ng 6.x? For. e. g. by just upgrading cli and/or the devkit packages?

@filipesilva
Copy link
Contributor Author

@kqadem right now it should work, but I can't guarantee that'll be the case as we go out of beta since the interface between @angular-devkit/build-angular and the CLI might change.

@flash-me
Copy link

@filipesilva Wow, thx for the quick reply! Alright, let's see how it comes. Having a quite big enterprise product here going to be launched soon prohitibing us major version changes.

Since the change only involves switching a package, we might even consider kind of dirty mapping from uglify to terser... I mean, ~60% build time reduction 😱

@filipesilva
Copy link
Contributor Author

Well that was for a specific project. I can't say that'll be the case for every project. Have you tried the beta on your app?

@flash-me
Copy link

I think I'm going to have a look at it by the end of the week.

Well that was for a specific project. I can't say that'll be the case for every project

yep, could be even more 😜

@cquixada
Copy link

cquixada commented Oct 18, 2018

We had the same problem involving uglify-es. Changing the version of "angular-devkit/build-angular" to "0.9.0-rc.3", even with Angular CLI 6.2.5, our application is running again with older versions of FF without needing "build-optimizer=false". Thanks.

@flash-me
Copy link

@cquixada did you notice any improvements regarding build time?

cexbrayat added a commit to cexbrayat/angular-cli that referenced this pull request Oct 30, 2018
Now that angular#11996 landed, the CLi uses Terser instead of UglifyJS.
cexbrayat added a commit to cexbrayat/angular-cli that referenced this pull request Oct 30, 2018
Now that angular#11996 landed, the CLI uses Terser instead of UglifyJS.
cexbrayat added a commit to cexbrayat/angular-cli that referenced this pull request Oct 30, 2018
Now that angular#11996 landed, the CLI uses Terser instead of UglifyJS.
kyliau pushed a commit that referenced this pull request Nov 1, 2018
Now that #11996 landed, the CLI uses Terser instead of UglifyJS.
kyliau pushed a commit to kyliau/angular-cli that referenced this pull request Nov 1, 2018
Now that angular#11996 landed, the CLI uses Terser instead of UglifyJS.
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
target: major This PR is targeted for the next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

--prod does not work in Firefox ESR 45.9.0
8 participants