Skip to content

Conversation

@framebassman
Copy link

@framebassman framebassman commented Jan 23, 2026

closes #2887


Summary by cubic

Render react-email templates in separate worker processes to prevent out-of-memory crashes when exporting large sets. Each template is rendered in isolation with cleanup to reduce memory use and improve stability. Fixes #2887.

  • Bug Fixes
    • Spawn a Node process per template to isolate memory and avoid OOM.
    • Write output (.html or .txt) and delete the built .cjs immediately.
    • Update spinner to show per-template progress and clearer errors.

Written for commit a4f378d. Summary will update on new commits.

@changeset-bot
Copy link

changeset-bot bot commented Jan 23, 2026

⚠️ No Changeset found

Latest commit: a4f378d

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Jan 23, 2026

@framebassman is attempting to deploy a commit to the resend Team on Vercel.

A member of the Team first needs to authorize it.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 23, 2026

Open in StackBlitz

npm i https://pkg.pr.new/resend/react-email@2888

commit: a4f378d

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

@framebassman framebassman marked this pull request as draft January 23, 2026 15:26
@framebassman framebassman changed the title fix(react-email): export email templates by chunks to avoid OOM issues fix(react-email): render email templates in separate nodejs process to avoid OOM issues Jan 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

email export fails with JavaScript heap OOM when exporting a large number of templates

1 participant