-
-
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
JSX parsing panics when using the spread operator #2037
Comments
Seems like swc_ecma_utils::HANDLER is not configured? |
Btw, it does not look like an erroneous input. |
I think the expected behavior is to raise an error For information, babel it will raise errors: |
@NamPNQ TypeScript transpiles it without error. Also there is a big difference between an error and a panic. |
@kitsonk |
Ok, I will look into that. It seems we don't have that set across several projects. The input isn't an error though, as I mentioned, TypeScript transforms it without error. |
swc also transpiles it without an error. |
Can you try configuring swc_ecma_utils::HANDLER? |
I am trying to, but we have never used Specifically when we bundle, we first create a |
I think scope should be the invokation of |
It was because The error we get now is: |
I'll do so, as I prefer behavior of tsc of it of babel. |
How difficult would the fix for this be (if someone with no context of the swc codebase would try to fix this)? |
It's not hard, but not sure how much it will be for others |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
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 the spread operator in a JSX block causes a panic (at least in Deno).
Input code
Expected behavior
The code to be emitted without a panic and something like:
Actual behaviour
Version
swc_common = "0.11.4"
swc_ecmascript = "0.46.0"
Additional context
The text was updated successfully, but these errors were encountered: