question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot use automatic jsx runtime in fresh

See original GitHub issue

I changed my deno.json to:

{
  "$schema": "https://cdn.deno.land/deno/versions/v1.23.2/raw/cli/schemas/config-file.v1.json",
  "compilerOptions": {
    "jsx": "react-jsx",
    "jsxImportSource": "preact"
  },
  "tasks": {
    "start": "deno run -A --watch=static/,routes/ dev.ts"
  },
  "importMap": "./import_map.json"
}

but it doesn’t work due to several lines in the fresh codebase explicitly setting

/** @jsx h */

Is there a reason for this? Why not use the automatic runtime always?

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:2
  • Comments:10 (8 by maintainers)

github_iconTop GitHub Comments

5reactions
lucacasonatocommented, Jul 29, 2022

I’m already working on it. Thanks for the offer though! (Currently blocked by an upstream Deno bug)

4reactions
lucacasonatocommented, Jul 29, 2022

Deno Deploy now also supports automatic runtime via deno.json and via /** @jsxImportSource */ 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bug: Cannot import 'react/jsx-runtime' from esm node/webpack ...
In the repo I work on, we've started publishing the library using the new runtime, using rollup+babel. If you install it ( npm...
Read more >
Upgrade React-App to use JSX transform - Stack Overflow
I do have an react-native project. I've upgraded to recent react and react-native version, even as all other packages in the project.
Read more >
Fresh 1.1 - automatic JSX, plugins, DevTools, and more
Official twind plugin. Twind is a small Tailwind-in-JS implementation that can generate CSS just-in-time based on the classes used in your JSX.
Read more >
Introducing the New JSX Transform – React Blog
With the new transform, you can use JSX without importing React. ... Starting from Babel 8, "automatic" will be the default runtime for...
Read more >
can't resolve 'react/jsx-runtime' - You.com | The AI Search ...
got Can't resolve 'react/jsx-runtime' error while use try to create the shared component with storybook in react-typescript.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found