Closed brandonstubbs closed 4 months ago
https://esbuild.github.io/content-types/#using-jsx-without-react we could configure esbuild. But I still worry about being the filter. I suspect this is why the HMR is not working in any of the demo's
If we want to support the transformations we could take a jsx
option to the plugin that could specify solid
for example
But I guess we have to be the filter? 🙃
See resolution in https://github.com/squint-cljs/vite-plugin-squint/pull/13
Should this still be in draft?
@martinklepsch yeah at the moment until we get #13 merged then I can fix these other PR's
HMR is not working, looking into it
HMR works now, it doesn't keep state during a module reload. But neither do the official templates
@martinklepsch this ones ready to go if you're happy 🙂
@brandonstubbs Awesome, added a few comments while reviewing the code, nothing that it inherently blocking so I'll let you address whatever you like & merge after. :+1:
This is the ported vite solid template
@martinklepsch This is where things get interesting, so
esbuild
will emitReact
JSX. We will need to be able to emit other types of JSX depending on the project.https://github.com/amoutonbrady/esbuild-plugin-solid https://github.com/unjs/unbuild also seems to support solid https://github.com/solidjs/vite-plugin-solid/blob/main/src/index.ts#L315-L328 the official plugin is using babel.
But this makes me worry, we are going to become the filter between all these other plugins. We will have to support them all. I wonder if there is a different approach?