`esm.sh` incorrectly transforms Solid JSX
Introduction
As Solid is far different than traditional JSX transformation, esm.sh produces very incorrect and React oriented JSX which can not be used in Solid even tho it's importing from Solid.
Result
An example of incorrect transformation: https://esm.sh/v102/@solidjs/[email protected]/deno/dist/index.jsx.development.js
Expected
What should happen is either it does not transform and return JSX or return an error that this module is not supported.
@LePichu thanks, i will look into it
if we just return the raw jsx, can it work in deno runtime?
if we just return the raw jsx, can it work in deno runtime?
Deno can deal with JSX/TSX, but also the fact that most people will be using something like ESBuild and that will take care of building the final output from JSX.
Reconfirmation; but JSX works/runs out of box on Deno.
Other question, how do you get the url https://esm.sh/v102/@solidjs/[email protected]/deno/dist/index.jsx.development.js ?
Reconfirmation; but JSX works/runs out of box on Deno.
yeah i know deno supports jsx, but seems solidjs is using babel to do ATO transplile
Other question, how do you get the url https://esm.sh/v102/@solidjs/[email protected]/deno/dist/index.jsx.development.js ?
![]()
It uhh.....

Reconfirmation; but JSX works/runs out of box on Deno.
yeah i know deno supports jsx, but seems solidjs is using babel to do ATO transplile
Is it not possible to return Raw JSX? Just transpiling the TS part and keeping the JSX intact? There's an ESBuild plugin to handle Solid JSX Transforms tho which we use, not sure if that's helpful.
There's an ESBuild plugin to handle Solid JSX Transforms tho which we use, not sure if that's helpful.
i think the plugin also uses babel too
in fact you can get the raw jsx code via https://esm.sh/@solidjs/[email protected]/dist/index.jsx
There's an ESBuild plugin to handle Solid JSX Transforms tho which we use, not sure if that's helpful.
i think the plugin also uses babel too
It does.
in fact you can get the raw jsx code via https://esm.sh/@solidjs/[email protected]/dist/index.jsx
I'll try around with this, thanks!
in fact you can get the raw jsx code via esm.sh/@solidjs/[email protected]/dist/index.jsx
~~This in deno doesn't return the raw JSX, but rather redirects to a precompiled version which uses React as a way to generate components~~
EDIT: entered the URL wrong, but it still doesnt work, due to the raw JSX having non-esm imports but rather nodeJS style imports

@ije I think having something like allowing to use ESBuild plugins in esm.sh to transform JS flavors properly could work here and also fix issues with other frameworks if there are any.