Skip to content

fix(js): bundle worklets in-process so no esbuild service outlives the build (release backport) - #5354

Merged
kixelated merged 1 commit into
releasefrom
fix/worklet-inline-esbuild-release
Oct 13, 2026
Merged

kixelated merged 1 commit into
releasefrom
fix/worklet-inline-esbuild-release

Conversation

@kixelated

@kixelated kixelated commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

Backport of #5353. workletInline bundled each ?worklet entry with esbuild's build(), which starts esbuild's long-lived service process. Nothing stopped it, so it outlived vite build. Once the parent exited it was orphaned and reaped by init, so its CPU never reached the build's process accounting, and a stray process lingered after the build.

Approach

The same change as on main, ported by hand, since release still has workletInline and no worklet test, so the cherry-pick conflicts.

  • workletInline bundles with rolldown (rolldown() + generate({ format: "es", codeSplitting: false }) + close()), in-process. As before, it does not minify on release.
  • esbuild devDependencies become rolldown at ^1.2.6, Vite 8.3.0's resolved version, in @moq/watch, @moq/publish, @moq/moq-boy, demo/boy, demo/web, and the audio-quality and interop JS clients. On release the plugin was esbuild's only user.
  • New js/common/worklet.test.ts (builds leave no child process behind), added to just js test. It fails on release and passes here.
  • just check origin/release passes.

Impact

  • No public API or wire change. Build tooling only.

Alternatives

See #5353.

Follow-ups

None.

(Written by Claude Opus 5.5)

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

…e build

Backport of fix/worklet-inline-esbuild to release, adapted to workletInline.

The worklet Vite plugin bundled with esbuild's build(), which starts esbuild's
long-lived service process. Nothing stopped it, so it outlived `vite build` and
was reaped by init, taking its CPU out of the build's accounting.

Bundle with rolldown, the bundler Vite 8 already runs, which works in-process
and leaves no child behind. The worklet consumers swap their esbuild
devDependency for rolldown at Vite's resolved version.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-12T14:59:08.914292Z 9effd54 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@kixelated

Copy link
Copy Markdown
Collaborator Author

Merge summary:

(Written by Claude Opus 5.5)

@kixelated
kixelated merged commit 046bfd4 into release Oct 13, 2026
7 checks passed
@kixelated
kixelated deleted the fix/worklet-inline-esbuild-release branch October 13, 2026 02:17
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.

1 participant