Skip to content
This repository has been archived by the owner on May 11, 2018. It is now read-only.

Commit

Permalink
Clarify reasons for the uglify option in README.md (#188)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikegreiling authored and existentialism committed Mar 6, 2017
1 parent 82b62c9 commit 0465a63
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Expand Up @@ -126,9 +126,11 @@ Note, browsers' results are overridden by explicit items from `targets`.

`number | true`

If you are using UglifyJS to minify your code, then targeting later browsers will throw a syntax error.
UglifyJS does not currently support any ES6 syntax, so if you are using Uglify to minify your code, targeting later browsers may cause Uglify to throw syntax errors.

To prevent this - specify the uglify option, which will enable all plugins and, as a result, fully compile your code to ES5. Note, that useBuiltIns will work as before, and only include the polyfills that your target(s) need.
To prevent these errors - specify the uglify option, which will enable all plugins and, as a result, fully compile your code to ES5. However, the `useBuiltIns` option will still work as before, and only include the polyfills that your target(s) need.

> NOTE: Uglify has a work-in-progress "Harmony" branch to address the lack of ES6 support, but it is not yet stable. You can follow its progress in [UglifyJS2 issue #448](https://github.com/mishoo/UglifyJS2/issues/448). If you require an alternative minifier which _does_ support ES6 syntax, we recommend using [Babili](https://github.com/babel/babili).
### `loose`

Expand Down

0 comments on commit 0465a63

Please sign in to comment.