Resend / Convex: Issue with Deploying JSX in Convex Environment - Unexpected Syntax Error
Can't for the life of me figure out how to resolve this issue. I'm encountering a deployment issue when using JSX within my Convex environment.
I've also added :
"jsx": "react-jsx"
under the compilerOptions
in my /convex/tsconfig.json
Here is the code:
I've also tried just calling the function like this and get the same error:
Any insight would be great, thanks guys!4 Replies
Update: This resolved the issue
https://discord.com/channels/1019350475847499849/1161498699558559754/1161557176649777183
Although not sure why this this is happening
Got it! So for others: Make sure the .tsx file is under the
convex/
folder.
I'm not exactly sure why this is happening, but it could be some interplay between esbuild and tsconfig.Yeah its strange, but somehow
react: (<div></div>)
works 🤷♂️Because that jsx is inline, the issue seems to be with importing jsx from outside of the convex directory.