nanojsx / nano

🎯 SSR first, lightweight 1kB JSX library.
http://nanojsx.io
MIT License
1.46k stars 38 forks source link

Feature: support new JSX Transform API #29

Closed Shinyaigeek closed 3 years ago

Shinyaigeek commented 3 years ago

Motivation

Fix: #21

Hi! Currently, tsc, swc, babel, flow ... transpile JSX into new factory function imported from {library}/jsx-runtime with the specific configuration.

For example in tsc, with { "jsx": "react-jsx", "jsxImportSource": "nano-jsx" } will insert import declaration import { jsx } from "nano-jsx/jsx-runtime" and transpile JSX into jsx function call.

I made a support for this.

What I did

If you have something unclear or wrong, feel free to point out it.