Introduce new compress option unsafe_arrows (#2278)

* Not always safe to convert a function expression to an arrow
  function when code depends on the function prototype existing.

Fixes #2271
This commit is contained in:
kzc
2017-08-16 10:51:26 -04:00
committed by Alex Lam S.L
parent a5461e0adc
commit ae0f117da6
4 changed files with 52 additions and 10 deletions

View File

@@ -36,9 +36,10 @@ compress_new_function_with_destruct: {
compress_new_function_with_destruct_arrows: {
options = {
arrows: true,
unsafe_arrows: true,
unsafe: true,
unsafe_Func: true,
ecma: 6
ecma: 6,
}
beautify = {
ecma: 6