add module option documentation
This commit is contained in:
parent
929d21e0b3
commit
a436b8a7ec
10
README.md
10
README.md
|
|
@ -497,6 +497,9 @@ if (result.error) throw result.error;
|
||||||
- `mangle.properties` (default `false`) — a subcategory of the mangle option.
|
- `mangle.properties` (default `false`) — a subcategory of the mangle option.
|
||||||
Pass an object to specify custom [mangle property options](#mangle-properties-options).
|
Pass an object to specify custom [mangle property options](#mangle-properties-options).
|
||||||
|
|
||||||
|
- `module` (default `false`) — Use when minifying an ES6 module. "use strict"
|
||||||
|
is implied and names can be mangled on the top scope.
|
||||||
|
|
||||||
- `output` (default `null`) — pass an object if you wish to specify
|
- `output` (default `null`) — pass an object if you wish to specify
|
||||||
additional [output options](#output-options). The defaults are optimized
|
additional [output options](#output-options). The defaults are optimized
|
||||||
for best compression.
|
for best compression.
|
||||||
|
|
@ -555,6 +558,7 @@ if (result.error) throw result.error;
|
||||||
keep_classnames: false,
|
keep_classnames: false,
|
||||||
keep_fnames: false,
|
keep_fnames: false,
|
||||||
ie8: false,
|
ie8: false,
|
||||||
|
module: false,
|
||||||
nameCache: null, // or specify a name cache object
|
nameCache: null, // or specify a name cache object
|
||||||
safari10: false,
|
safari10: false,
|
||||||
toplevel: false,
|
toplevel: false,
|
||||||
|
|
@ -703,6 +707,9 @@ If you're using the `X-SourceMap` header instead, you can just omit `sourceMap.u
|
||||||
- `loops` (default: `true`) -- optimizations for `do`, `while` and `for` loops
|
- `loops` (default: `true`) -- optimizations for `do`, `while` and `for` loops
|
||||||
when we can statically determine the condition.
|
when we can statically determine the condition.
|
||||||
|
|
||||||
|
- `module` (default `false`) -- Pass `true` when compressing an ES6 module. Strict
|
||||||
|
mode is implied and the `toplevel` option as well.
|
||||||
|
|
||||||
- `negate_iife` (default: `true`) -- negate "Immediately-Called Function Expressions"
|
- `negate_iife` (default: `true`) -- negate "Immediately-Called Function Expressions"
|
||||||
where the return value is discarded, to avoid the parens that the
|
where the return value is discarded, to avoid the parens that the
|
||||||
code generator would insert.
|
code generator would insert.
|
||||||
|
|
@ -824,6 +831,9 @@ If you're using the `X-SourceMap` header instead, you can just omit `sourceMap.u
|
||||||
Useful for code relying on `Function.prototype.name`. See also: the `keep_fnames`
|
Useful for code relying on `Function.prototype.name`. See also: the `keep_fnames`
|
||||||
[compress option](#compress-options).
|
[compress option](#compress-options).
|
||||||
|
|
||||||
|
- `module` (default `false`) -- Pass `true` an ES6 modules, where the toplevel
|
||||||
|
scope is not the global scope. Implies `toplevel`.
|
||||||
|
|
||||||
- `reserved` (default `[]`) -- Pass an array of identifiers that should be
|
- `reserved` (default `[]`) -- Pass an array of identifiers that should be
|
||||||
excluded from mangling. Example: `["foo", "bar"]`.
|
excluded from mangling. Example: `["foo", "bar"]`.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user