Skip to content

Conversation

@framebassman
Copy link

@framebassman framebassman commented Jan 23, 2026

closes #2887


Summary by cubic

Render React Email templates in separate Node.js processes to prevent OOM on large exports. Each render is isolated, reports progress, cleans up, and surfaces clearer errors; fixes #2887.

  • Bug Fixes
    • Compile and ship a worker (dist/commands/export-worker.js) via tsdown; spawn one process per template with Node’s execPath.
    • Pass JSON input via argv; parse worker stdout/stderr as JSON; progress shows Rendering name (i/total); clearer failure output.
    • Worker writes .html or .txt and removes the .cjs build on success.
    • Tests: add a 100-template stress suite; split Vitest into functional and stress projects; default test runs functional, add test:stress; fix functional import paths.

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

@changeset-bot
Copy link

changeset-bot bot commented Jan 23, 2026

⚠️ No Changeset found

Latest commit: 6515641

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: 6515641

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
@framebassman framebassman marked this pull request as ready for review February 9, 2026 10:59
@framebassman framebassman marked this pull request as draft February 9, 2026 13:00
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.

1 issue found across 6 files (changes from recent commits).

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="packages/react-email/src/commands/testing/stress/export.spec.ts">

<violation number="1" location="packages/react-email/src/commands/testing/stress/export.spec.ts:10">
P2: `fsPromises.rm(emailsDir)` is called without `recursive/force` and the directory is never recreated, so the test will throw ENOENT on first run and `fsPromises.cp` will fail because the parent directory doesn't exist.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

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