I am using vanilla Cloudflare Pages Functions with cloudflare pages dev and I'm experimenting with @vercel/og using the plug-in as documented in the Generate arbitrary images section. I have it working with plain js (React.createElement), but when using jsx like in the examples I get a parse error from es-module-lexer when miniflare is trying to get the entry points as the parser doesn't support jsx. Is there any way to use jsx / tsx without another framework that relies on building with vite or webpack? It seems to compile ok when using wrangler pages functions build, although it's not transforming the jsx into plain js.
I am using vanilla Cloudflare Pages Functions with
cloudflare pages dev
and I'm experimenting with@vercel/og
using the plug-in as documented in the Generate arbitrary images section. I have it working with plain js (React.createElement
), but when using jsx like in the examples I get a parse error fromes-module-lexer
whenminiflare
is trying to get the entry points as the parser doesn't support jsx. Is there any way to use jsx / tsx without another framework that relies on building with vite or webpack? It seems to compile ok when usingwrangler pages functions build
, although it's not transforming the jsx into plain js.