You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 11, 2018. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -120,16 +120,6 @@ A query to select browsers (ex: last 2 versions, > 5%) using [browserslist](http
120
120
121
121
Note, browsers' results are overridden by explicit items from `targets`.
122
122
123
-
### `targets.uglify`
124
-
125
-
`number | true`
126
-
127
-
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.
128
-
129
-
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.
130
-
131
-
> 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).
Don't add polyfills automatically per file, or transform `import "babel-polyfill"` to individual polyfills.
251
241
242
+
### `useSyntax`
243
+
244
+
`boolean`, defaults to `true`.
245
+
246
+
NOTE: `targets.uglify` is deprecated and will be removed in the next major in favor of this.
247
+
248
+
Runs the transforms needed for the targeted environment(s). Set this to `false` if you want to force running _all_ transforms which is useful if the output will be run through UglifyJS, or an environment that only supports ES5.
249
+
250
+
> 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).
0 commit comments