Skip to content

fix: omit bundler from worker configuration clones - #1261

Closed
ADITHYAKUMARREDDY wants to merge 1 commit into
nodejs:mainfrom
ADITHYAKUMARREDDY:fix/bundler-worker-clone
Closed

ADITHYAKUMARREDDY wants to merge 1 commit into
nodejs:mainfrom
ADITHYAKUMARREDDY:fix/bundler-worker-clone

Conversation

@ADITHYAKUMARREDDY

Copy link
Copy Markdown

Fixes #1201

Summary

Worker threads that render HTML pages receive a structured clone of the generator configuration. A custom html.bundler adapter (including createViteBundler(...)) holds functions, so the clone threw DataCloneError whenever threads > 1.

Omit bundler from the worker payload. Building still runs on the main thread with the full adapter; workers only need the rest of the html options for rendering. Docs no longer require threads: 1 for a custom bundler.

Test plan

  • node --test packages/core/src/threading/__tests__/parallel.test.mjs
  • Config with html.bundler: createViteBundler() builds with the default thread count

Worker threads only render pages and do not need the HTML bundler
adapter. Dropping it from the structured-clone payload lets
createViteBundler(...) and other adapters work with the default
thread count instead of throwing DataCloneError.

Fixes nodejs#1201
@ADITHYAKUMARREDDY
ADITHYAKUMARREDDY requested a review from a team as a code owner November 26, 2026 16:10
@vercel

vercel Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
api-docs-tooling Ready Ready Preview Nov 26, 2026 4:10pm UTC

Request Review

@avivkeller

Copy link
Copy Markdown
Member

Closing. Please read closed PRs and existing discussion before opening a new one. Duplicate PRs for changes we've explicitly declined waste maintainer time.

This branch was successfully deployed

1 active deployment
Preview – api-docs-tooling — 0cdcf785 Deployed Nov 26, 2026 by vercel[bot]
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.

html: a custom bundler fails with DataCloneError unless threads is 1

2 participants