unjs / jiti

Runtime TypeScript and ESM support for Node.js
MIT License
1.9k stars 62 forks source link

Smarter JSX detection #302

Open pi0 opened 2 months ago

pi0 commented 2 months ago

Describe the feature

We added initial JSX support in #200 (thanks to @yuusheng), however, framework configuration is manual and Solid needs a different transformer than @babel/plugin-transform-react-jsx (babel-plugin-jsx-dom-expressions)

If we can somehow join these two plugins and make it smarter to detect renderer lib per-file (to infer imports and render function) it could make integration zero-config!

Considering the maintenance requirements of this and reusability, I think it probably has to be an external repo for the Babel plugin, however initiating it from here.

If anyone wants to help on this it is more than welcome!