hono
hono copied to clipboard
JSX conflict with React email components
What version of Hono are you using?
4.5.2
What runtime/platform is your app running on?
Cloudflare pages
What steps can reproduce the bug?
The JSX has lots of conflicts with @react-email/components and unable to build the email templated using react-email. Here is my tsconfig.json
{
"compilerOptions": {
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "Bundler",
"strict": true,
"skipLibCheck": true,
"lib": [
"ESNext"
],
"types": [
"@cloudflare/workers-types",
],
"jsx": "react-jsx",
"jsxImportSource": "hono/jsx"
},
}
What is the expected behavior?
There should not be any conflict I guess
What do you see instead?
JSX conflict with other library compnents
Additional information
No response
Hi @vickyRathee
How about adding the declaration at the top of the code?
/** @jsxImportSource react */
@yusukebe Awesome, working fine with that.
@yusukebe the latest version of react-email doesn't work. It throws an Uncaught ReferenceError: MessageChannel is not defined Error