You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When only one logger.log exists, in 1 pass, the code would be compiled to a chaining method call and blocks further dead code detection. When uncomment the second / the last two lines, 1 pass compiled codes are different and lead to different multi pass compiled code.
Terser could work more stable in this scenario. You can copy the code to https://try.terser.org/ and configure compress.passes to 1/2/3 to see how it is different from SWC.
Not a bug, but I hope it could be improved, so that I can remove lots of strings logged by logger in out app with SWC's minimizer.
Thank you!
Babel plugin or link to the feature description
No response
Additional context
No response
The text was updated successfully, but these errors were encountered:
The only problem is that when the value of the property is Ident(AST_SymbolRef), we have not collected the fixed expr of all idents but those to be inlined. So for now, by the above, we can only optimize ({ f: (x) => console.log(x) }).f(1) to console.log(1), but we can't optimize:
constf=(x)=>console.log(x);console.log(f);// another reference that prevents minifier inlining f({f: f}).f(1);
Describe the feature
playground link
When only one
logger.log
exists, in 1 pass, the code would be compiled to a chaining method call and blocks further dead code detection. When uncomment the second / the last two lines, 1 pass compiled codes are different and lead to different multi pass compiled code.Terser could work more stable in this scenario. You can copy the code to https://try.terser.org/ and configure compress.passes to 1/2/3 to see how it is different from SWC.
Not a bug, but I hope it could be improved, so that I can remove lots of strings logged by logger in out app with SWC's minimizer.
Thank you!
Babel plugin or link to the feature description
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: