fix corner cases in templates (#4610)

This commit is contained in:
Alex Lam S.L
2021-02-02 17:39:30 +00:00
committed by GitHub
parent 3c556b8689
commit a2f27c7640
3 changed files with 63 additions and 4 deletions

View File

@@ -769,6 +769,9 @@ to be `false` and all symbol names will be omitted.
- `switches` (default: `true`) -- de-duplicate and remove unreachable `switch` branches
- `templates` (default: `true`) -- compact template literals by embedding expressions
and/or converting to string literals, e.g. `` `foo ${42}` → "foo 42"``
- `top_retain` (default: `null`) -- prevent specific toplevel functions and
variables from `unused` removal (can be array, comma-separated, RegExp or
function. Implies `toplevel`)