From 0cb75089f059f8cdf97fc4a0bbb7a8d9dd0c0fa9 Mon Sep 17 00:00:00 2001 From: kzc Date: Wed, 31 May 2017 11:16:20 -0400 Subject: [PATCH] document safari10 mangle option (#2035) --- README.md | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 061e62a5..c9032861 100644 --- a/README.md +++ b/README.md @@ -677,17 +677,22 @@ If you're using the `X-SourceMap` header instead, you can just omit `sourceMap.u ## Mangle options -- `reserved` - pass an array of identifiers that should be excluded from mangling +- `reserved` (default `[]`). Pass an array of identifiers that should be + excluded from mangling. Example: `["foo", "bar"]`. -- `toplevel` — mangle names declared in the top level scope (disabled by -default). +- `toplevel` (default `false`). Pass `true` to mangle names declared in the + top level scope. -- `eval` — mangle names visible in scopes where eval or with are used -(disabled by default). +- `keep_fnames` (default `false`). Pass `true` to not mangle function names. + Useful for code relying on `Function.prototype.name`. See also: the `keep_fnames` + [compress option](#compress-options). -- `keep_fnames` -- default `false`. Pass `true` to not mangle -function names. Useful for code relying on `Function.prototype.name`. -See also: the `keep_fnames` [compress option](#compress-options). +- `eval` (default `false`). Pass `true` to mangle names visible in scopes + where `eval` or `with` are used. + +- `safari10` (default `false`). Pass `true` to work around the Safari 10 loop + iterator [bug](https://bugs.webkit.org/show_bug.cgi?id=171041) + "Cannot declare a let variable twice". Examples: