Repository navigation
fix(js): bundle worklets in-process so no esbuild service outlives the build (release backport) - #5354
Merged
Conversation
…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>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Collaborator
Author
|
Merge summary:
(Written by Claude Opus 5.5) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Backport of #5353.
workletInlinebundled each?workletentry with esbuild'sbuild(), which starts esbuild's long-lived service process. Nothing stopped it, so it outlivedvite 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, sincereleasestill hasworkletInlineand no worklet test, so the cherry-pick conflicts.workletInlinebundles with rolldown (rolldown()+generate({ format: "es", codeSplitting: false })+close()), in-process. As before, it does not minify onrelease.esbuilddevDependencies becomerolldownat^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. Onreleasethe plugin was esbuild's only user.js/common/worklet.test.ts(builds leave no child process behind), added tojust js test. It fails onreleaseand passes here.just check origin/releasepasses.Impact
Alternatives
See #5353.
Follow-ups
None.
(Written by Claude Opus 5.5)
🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.