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

Merged
merged 2 commits into from
Sep 28, 2018

Conversation

n0v1
Copy link
Contributor

@n0v1 n0v1 commented Sep 27, 2018

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 and cache options to the right place.

@rigor789
Copy link
Member

Thanks for the PR, I'll merge this after we've merged #99

@rigor789 rigor789 merged commit 8aaf85f into nativescript-vue:master Sep 28, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants