snabbdom
snabbdom copied to clipboard
Support new @babel/preset-react automatic runtime
As the title says, feature request.
{
"plugins": [
[
"@babel/plugin-transform-react-jsx",
{
"runtime": "automatic", // defaults to classic
"importSource": "jsx"
}
]
]
}
Refs: [1] https://babeljs.io/docs/en/babel-preset-react [2] https://zh-hant.reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html
What should we have to do for this?
At least providing snabbdom/jsx-runtime
and snabbdom/jsx-dev-runtime
modules and exporting jsx
and jsxs
functions?
Support for fragments is also necessary?
I am not 100% sure, but I don't think support for fragments is required, just exporting a jsx
function should be enough.
snabbdom already has that one, so it should not be hard to reexport it from the relevant modules