feat(minifier): compress single consequence if statement.#6266
feat(minifier): compress single consequence if statement.#6266
Conversation
Your org has enabled the Graphite merge queue for merging into mainAdd the label “0-merge” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix. You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link. |
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
|
|
||
| // Try it out with properties and methods | ||
| fold("function f(){if(x){a.b=1}}", "function f(){if(x)a.b=1}"); | ||
| fold("function f(){if(x){a.b=1}}", "function f(){x&&(a.b=1)}"); |
| // fold("function f(){if(x){if(y)foo();else bar()}}", "function f(){x&&(y?foo():bar())}"); | ||
| // fold("function f(){if(x){if(y)foo()}else bar()}", "function f(){x?y&&foo():bar()}"); | ||
| // fold( | ||
| // "function f(){if(x){if(y)foo();else bar()}else{baz()}}", | ||
| // "function f(){x?y?foo():bar():baz()}", | ||
| // ); |
There was a problem hiding this comment.
Currently I didn't support handling the BlockStatement.
CodSpeed Performance ReportMerging #6266 will degrade performances by 42.89%Comparing Summary
Benchmarks breakdown
|
6a0825b to
f1f0819
Compare
e4fcd01 to
37cbabb
Compare
f1f0819 to
d507f18
Compare
|
Stale. Maybe we can find a better way to handle this. |

Seems that the
gzipis so metaphysical... I don't know why it enlarges the gzipped size.