Skip to content

fix(email): convert email-validator for installed Void worker runtimes in dev - #407

Merged
Brooooooklyn merged 4 commits into
mainfrom
fix/email-validator-worker-dev
Oct 13, 2026
Merged

Brooooooklyn merged 4 commits into
mainfrom
fix/email-validator-worker-dev

Conversation

@TheAlexLichter

Copy link
Copy Markdown
Member

When running vp dev, importing void/email crashes with ReferenceError: exports is not defined, and the crash takes down every page, not just the email route.
That's because Void excludes itself from the worker dep optimizer, so its CommonJS dependency email-validator reaches workerd without conversion.

If Void owns the workerd runtime (no framework, TanStack Start, React Router, vinext), it now adds include: ['void > email-validator'].

Note: This might be also the case with hyperdrive and mysql2, but I couldnt repro this yet.

@TheAlexLichter
TheAlexLichter requested a review from a team as a code owner October 12, 2026 08:48
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview URL: https://fix-email-validator-worker-dev-void-cloud.voidzero-docs.workers.dev (commit ac91636)

This URL reflects your latest Preview deployment

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://45401ff1-void-cloud.voidzero-docs.workers.dev ac91636 2026-10-13T03:45:31.413Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://78671ce0-void-cloud.voidzero-docs.workers.dev 42b2bfb 2026-10-13T03:11:56.100Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://0d079e17-void-cloud.voidzero-docs.workers.dev 247e7d6 2026-10-12T09:30:31.421Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://359297df-void-cloud.voidzero-docs.workers.dev fbfd5a7 2026-10-12T08:44:50.762Z Visit the dashboard ↗

Brooooooklyn and others added 2 commits October 13, 2026 11:10
The full packed suite runs the email route under `vite preview` too. The
built Worker has no dev inbox and no send binding there, so sendEmail
returns BINDING_MISSING. Assert that instead of ok, and return the whole
result so a failure shows its reason.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@Brooooooklyn
Brooooooklyn merged commit a1bc821 into main Oct 13, 2026
19 checks passed
@Brooooooklyn
Brooooooklyn deleted the fix/email-validator-worker-dev branch October 13, 2026 03:52
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.

2 participants