diff options
author | kzc <kzc@users.noreply.github.com> | 2017-10-25 02:03:43 -0400 |
---|---|---|
committer | Alex Lam S.L <alexlamsl@gmail.com> | 2017-10-25 14:03:43 +0800 |
commit | ae67a4985073dcdaa2788c86e576202923514e0d (patch) | |
tree | cf653bb92bbec35899e205e6dd08bcfc3980bc09 /README.md | |
parent | 4178289c382caf2eb3464390370dd1400a23468a (diff) | |
download | tracifyjs-ae67a4985073dcdaa2788c86e576202923514e0d.tar.gz tracifyjs-ae67a4985073dcdaa2788c86e576202923514e0d.zip |
document compress option `hoist_props` (#2399)
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -632,6 +632,12 @@ If you're using the `X-SourceMap` header instead, you can just omit `sourceMap.u - `hoist_funs` (default: `true`) -- hoist function declarations +- `hoist_props` (default: `false`) -- hoist properties from constant object and + array literals into regular variables subject to a set of constraints. For example: + `var o={p:1, q:2}; f(o.p, o.q);` is converted to `f(1, 2);`. Note: `hoist_props` + works best with `mangle` enabled, the `compress` option `passes` set to `2` or higher, + and the `compress` option `toplevel` enabled. + - `hoist_vars` (default: `false`) -- hoist `var` declarations (this is `false` by default because it seems to increase the size of the output in general) |