Carere
Carere•11mo ago

Impossible to use `"jsx": "preserve"` in deno.json...

Well it seems that I can't use jsx preserve in deno.json, when I try to run any tasks in deno.json, I get the following error:
error: Unsupported 'jsx' compiler option value 'preserve'. Supported: 'react-jsx', 'react-jsxdev', 'react'
at file:///home/carere/Projects/Ashiso/zentai/deno.json
error: Unsupported 'jsx' compiler option value 'preserve'. Supported: 'react-jsx', 'react-jsxdev', 'react'
at file:///home/carere/Projects/Ashiso/zentai/deno.json
I use Solid-JS in my project, how should I proceed ?
4 Replies
Mark G
Mark G•11mo ago
preserve would make no sense in Deno, as it needs to compile to JS that can run in its v8 engine
Carere
Carere•11mo ago
So how I suppose to work with SolidJs ?
Mark G
Mark G•11mo ago
if SolidJs is a client-side framework then the config would be for the bundling of client-side JS, deno would only be used to run the build tools, it wouldn't compile the actual JSX, for example if you used esbuild to bundle the jsx, the preserve config need to be in the esbuild config. If it's a server-side framework it may need specific support for deno. There are a few Deno related discussions over in the SolidJS project... https://github.com/solidjs/solid/discussions?discussions_q=is%3Aopen+deno
GitHub
solidjs solid · Discussions
Explore the GitHub Discussions forum for solidjs solid. Discuss code, ask questions & collaborate with the developer community.
Carere
Carere•11mo ago
Well I'm building an SPA with Vitejs actually, so it seems that it would cause no problem, thx for your answer 🙂