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

thread 'main' panicked at 'failed to determine top-level Id for jsx expression' #18779

Closed
NotWoods opened this issue Apr 20, 2023 · 3 comments
Closed

Comments

@NotWoods
Copy link

NotWoods commented Apr 20, 2023

Platform: windows x86_64
Version: 1.32.0
Args: ["C:\\Users\\tiger\\.deno\\bin\\deno.exe", "run", ".\\src\\generate.ts"]

thread 'main' panicked at 'failed to determine top-level Id for jsx expression', C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\swc_ecma_transforms_typescript-0.171.4\src\strip.rs:252:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

How to reproduce:

Use a deno.json with the following:

{
  "compilerOptions": {
    "jsxFactory": "h",
    "jsxFragmentFactory": "null"
  }
}

Why u do this?

To use fragments with vhtml, null is used rather than a special helper function. (h(null, {}, ...children))

Using undefined as the jsxFragmentFactory works fine.

@lucacasonato
Copy link
Member

Does this work in TSC?

@NotWoods
Copy link
Author

I was able to run TSC with this config (and setting jsx to react)

@marvinhagemeister
Copy link
Contributor

Just tried this out with Deno 1.42.4 and the null value is inserted as expected 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants