-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
es(minify): if_return plus sequence optimize make code run in wrong order #9485
Comments
can not be reproduced in https://play.swc.rs with swc 1.7.4 nor nightly |
@kdy1 any hint for me? maybe i can help to fix it |
It's not a bug of SWC minifier; it's wrong usage I guess |
You may need |
Can you try the example minifier with your input? |
yes, it works as expected . i am a little confused to when/where to use fixer? after calling |
After applying the name mangler or the |
thx a lot |
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Describe the bug
using swc_core: 0.101.4
just parse, resolve, optimize to the input code, then final generated code run in the wrong order.
in the input code, the
hook
will not be called, is async isfalse
after optimize
Input code
Config
No response
Playground link (or link to the minimal reproduction)
https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=b61031e4d72c3952b521891a3b3f7955
SWC Info output
No response
Expected behavior
no matter what value
async
is, functionhook
should always be called.Actual behavior
after optimize
if
e
(async
) isfalse
, ther
(hook
) will never be calledVersion
0.101.4
Additional context
config CompressOption with below, code works as expect
The text was updated successfully, but these errors were encountered: