-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
SWC transpiles optional chaining even tho it shouldn't #1922
Comments
It's caused by https://github.com/babel/babel/blob/main/packages/babel-compat-data/data/plugins.json not containing proper node version of |
Closing as fixed by #3072 |
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
Possible regression of #1704 ?
SWC transpiles optional chaining for node, even when setting target to latest node which supports optional chaining.
Input code
Current output code:
Config
Expected behavior
Version
The version of @swc/core:
Additional context
Idk but it feels like not transpiling it might be faster at runtime
Repro .zip:
swc-optional-chaining.zip
The text was updated successfully, but these errors were encountered: