doc: mention ecma in arrows compress option

This commit is contained in:
kzc 2017-08-14 10:17:32 -04:00
parent cf052c05eb
commit edd1479d51

View File

@ -649,6 +649,7 @@ If you're using the `X-SourceMap` header instead, you can just omit `sourceMap.u
- `arrows` (default `true`) -- Converts `()=>{return x}` to `()=>x`. Class - `arrows` (default `true`) -- Converts `()=>{return x}` to `()=>x`. Class
and object literal methods will also be converted to arrow expressions if and object literal methods will also be converted to arrow expressions if
the resultant code is shorter: `m(){return x}` becomes `m:()=>x`. the resultant code is shorter: `m(){return x}` becomes `m:()=>x`.
This transform requires that the `ecma` compress option is set to `6` or greater.
- `unsafe_arrows` (default `false`) -- Convert ES5 style anonymous function - `unsafe_arrows` (default `false`) -- Convert ES5 style anonymous function
expressions to arrow functions if the function body does not reference `this`. expressions to arrow functions if the function body does not reference `this`.