Open cprussin opened 10 months ago
Coming from react-email, I'm using cloudflare pages with next-on-pages for my nextjs app, react-email/tailwind package are too large until can't deploy it in cloudflare pages.
So I switch to jsx-email, after amending the code to fit jsx-email, I hit a lot of errors from clean-css: Module not found: Can't resolve 'fs' Module not found: Can't resolve 'path'
Any idea on how to fix this?
@sisheng1998 this entire issue is about getting the package to work correctly on the edge. I suggest you read the entire thread.
the v2.0.0 PR is up and gets us closer to where we want to be for edge compat https://github.com/shellscape/jsx-email/pull/206
this will let you optionally include the minify plugin. i'm planning a cloudflare integration test following this release (thanks to our friends at SST) which will help guarantee edge compat moving forward.
v2 release will happen around 1PM ET tomorrow. A Cloudflare recipe and direct support will be my top priority afterwards.
Expected Behavior / Situation
Compatibility with Edge runtime (vercel etc)
Actual Behavior / Situation
Not compatible with Edge runtime -- throws
Module not found: Can't resolve 'os'
due toclean-css
:Modification Proposal
I don't know much about what jsx-email is using
clean-css
for but perhaps there's an alternate library that could be used instead which is compatible with the Edge runtime and only uses web-compatible APIs?