Skip to content
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

Panic on @jsxFrag null #7539

Closed
0f-0b opened this issue Jun 17, 2023 · 1 comment · Fixed by #7540
Closed

Panic on @jsxFrag null #7539

0f-0b opened this issue Jun 17, 2023 · 1 comment · Fixed by #7540
Assignees
Labels
Milestone

Comments

@0f-0b
Copy link

0f-0b commented Jun 17, 2023

Describe the bug

SWC panics when transpiling TypeScript if @jsxFrag is null.

Input code

/* @jsx h */
/* @jsxFrag null */
<></>;

Config

{
  "jsc": {
    "parser": {
      "syntax": "typescript",
      "tsx": true
    }
  },
  "isModule": true
}

Playground link

https://play.swc.rs/?version=1.3.64&code=H4sIAAAAAAAAA9PXUnDIKq5QyFDQ0ufSh3DcihLTFfJKc3JAYjZ2Nvp21lwASiTFyigAAAA%3D&config=H4sIAAAAAAAAA6vmUlBQyipOVrJSqAYygZyCxKLi1CI4HyhSXJlXklgBFFEqqSxILU4uyiwoUdKByZYUg6RKikpTwSK1QLIWJKmUWeybn1KakwqTreUCAAfv7CNtAAAA

Expected behavior

Babel and tsc output is h(null, null).

Actual behavior

panicked at 'failed to determine top-level Id for jsx expression', /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/swc_ecma_transforms_typescript-0.179.3/src/strip.rs:252:13

Version

1.3.64

Additional context

No response

@0f-0b 0f-0b added the C-bug label Jun 17, 2023
@kdy1 kdy1 self-assigned this Jun 19, 2023
@kdy1 kdy1 added this to the Planned milestone Jun 19, 2023
kdy1 added a commit that referenced this issue Jun 19, 2023
@kdy1 kdy1 modified the milestones: Planned, v1.3.65 Jun 19, 2023
@swc-bot
Copy link
Collaborator

swc-bot commented Jul 19, 2023

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.

@swc-project swc-project locked as resolved and limited conversation to collaborators Jul 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

Successfully merging a pull request may close this issue.

3 participants