taiwannumberone
taiwannumberone14mo ago

The requested module 'test/jsx-runtime' does not provide an export named 'jsxs'

hej, I have a exported function jsx() stored in jsx-runtime.ts. I also added these deno.json settings, so typescript would transpile jsx using my custom function without the need of importing it.
{
"imports": {
"test/jsx-runtime": "./jsx-runtime.ts"
},
"compilerOptions": {
"jsx": "react-jsx",
"jsxImportSource": "test"
}
}
{
"imports": {
"test/jsx-runtime": "./jsx-runtime.ts"
},
"compilerOptions": {
"jsx": "react-jsx",
"jsxImportSource": "test"
}
}
I used imports property so it would point to my file. The error I'm getting looks like this: error: Uncaught SyntaxError: The requested module 'test/jsx-runtime' does not provide an export named 'jsxs' And my question is: What exactly is jsxs or where I can find documentation on that? Typescript docs only mention either jsx() or jsxDEV() depending on your config
2 Replies
marvinh.
marvinh.14mo ago
There isn't a proper page to point to for this I'm afraid. The automatic runtime transform expects you to implement jsx, jsxs , jsxDev and Fragment. There is some loose information on the babel transform docs https://babeljs.io/docs/babel-plugin-transform-react-jsx you can also checkout the implementation we use in Preact https://github.com/preactjs/preact/blob/main/jsx-runtime/src/index.js
taiwannumberone
taiwannumberoneOP14mo ago
Oh, gotcha that's too bad. I will check out the preact repo to learn more about it, thanks!