This repository has been archived by the owner on Dec 5, 2022. It is now read-only.
Replace abandoned uglifyjs with terser for better es6 support #100
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
uglifyjs-webpack-plugin uses
uglify-es
(the harmony branch of mishoo/UglifyJS2) which is no longer maintained, and has been replaced by a fork called terser. The fork has incorporated a number of fixes and testcases that were left to go stale in the original project. Terser is API compatible to uglify.Webpack is also in the process of switching to terser. The corresponding webpack plugin terser-webpack-plugin is aldready in the webpack-contrib repository.
When minifying our NativeScript Vue app (via
--env.production
) we had crashes on app launch caused by Safari bug 176685. Terser can apply a workaround for this (and other) safari bugs when specifying the safari10 option. This pull request sets this option when building for iOS.It also moves the
parallel
andcache
options to the right place.