fix: include imported worker assets in build manifest (fix #23377) - #23384
Open
DaZuiZui wants to merge 3 commits into
Open
fix: include imported worker assets in build manifest (fix #23377)#23384DaZuiZui wants to merge 3 commits into
DaZuiZui wants to merge 3 commits into
Conversation
7 tasks
DaZuiZui
force-pushed
the
codex/fix-worker-manifest
branch
from
August 27, 2026 07:09
797ec31 to
e54ec62
Compare
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.
What does this PR do?
This fixes missing worker assets in the Vite build manifest when a worker is imported with
?worker&url(and related bundled worker references).Why?
Vite emits the worker file to
dist/assets, but the emitted asset loses itsoriginalFileNamemetadata. Rolldown's manifest plugin uses that metadata to associate assets with their importing entry, so the worker is omitted frommanifest.json. This prevents integrations such as SvelteKit from discovering the worker for service-worker caching.The fix preserves the worker bundle/chunk source metadata and passes
originalFileNamewhen the asset is emitted. The worker is then listed in the importing entry'sassetsarray.Fixes #23377
Alternatives considered
A framework-specific workaround would duplicate Vite's asset tracking. Since the file is already emitted by Vite, keeping its source metadata is the minimal fix at the correct layer.
Tests
pnpm --filter vite typecheckpnpm --filter vite buildmanifest.json.Browser E2E was not run because Playwright Chromium is not installed in the local environment.
AI disclosure
AI assistance was used during the investigation and drafting of this PR. I reviewed the generated changes, verified the root cause against the Rolldown/Vite build flow, and ran the checks listed above.