What versions are you using? (if relevant)
@react-email/components@1.0.7, react-email@5.2.8, @react-email/preview-server@5.2.8
Describe the Bug
If there is a dependency in the app, or as in our case any app in a monorepo, to a version of esbuild that doesn't match the one in @react-email/preview-server the preview of the email will crash.
The only way to get it to work if you have a dependency on esbuild in your app is to make sure it matches the version @react-email/preview-server uses. And if in a monorepo you need to make sure all other apps use the same version too.
I think it started happening after this PR which upgraded next and touched the esbuild dep.
Browser:

Terminal:

What is affected (leave empty if unsure)
Preview Server
Link to the code that reproduces this issue
https://github.com/crudh/react-email-esbuild-issue
To Reproduce
- Start the preview using
pnpm dev
- Verify that it crashes when trying to preview the email
- Remove the
esbuild dev dependency in the app and try again, the preview works
Expected Behavior
I expect not to have to match the version of esbuild in my app/monorepo to the internal one in @react-email/prevew-server to avoid breaking email preview.
What's your node version? (if relevant)
24.13.0
What versions are you using? (if relevant)
@react-email/components@1.0.7, react-email@5.2.8, @react-email/preview-server@5.2.8
Describe the Bug
If there is a dependency in the app, or as in our case any app in a monorepo, to a version of
esbuildthat doesn't match the one in@react-email/preview-serverthe preview of the email will crash.The only way to get it to work if you have a dependency on
esbuildin your app is to make sure it matches the version@react-email/preview-serveruses. And if in a monorepo you need to make sure all other apps use the same version too.I think it started happening after this PR which upgraded
nextand touched theesbuilddep.Browser:

Terminal:

What is affected (leave empty if unsure)
Preview Server
Link to the code that reproduces this issue
https://github.com/crudh/react-email-esbuild-issue
To Reproduce
pnpm devesbuilddev dependency in the app and try again, the preview worksExpected Behavior
I expect not to have to match the version of
esbuildin my app/monorepo to the internal one in@react-email/prevew-serverto avoid breaking email preview.What's your node version? (if relevant)
24.13.0