Replies: 1 comment 4 replies
-
It would be better for performance but not for the DX. The reason it might be so big is because we use react-dom under the hood. Another idea would be to bundle react-dom as well, (which can cause issues, so it should be done very carefully), and treeshake what is needed from it as we don't really need that much code. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I didn't come from NextJS and React world so I may not understand something, but is it okay for everyone that I need to include +384kb (111kb gzipped) of JS just to render a simple email at runtime (with
@react-email/render
)?Disclaimer: I love the way
react-email
gives simple tools to design emails from react and I think that the idea of moving emails to code is great!But isn't it just overkill for backend-only servers (not NextJS) like simple Hono over Cloudflare Workers - to load whole React Email render logic? Perhaps it's better to prerender React emails at build time and then simply replace properties at runtime with some template engine and zero runtime footprint. But somehow I have found no discussions around this topic at all.
I would be very glad if someone pointed me to a solution that I missed.
Beta Was this translation helpful? Give feedback.
All reactions