Skip to content

fix(bundled-dev): serve assets emitted during HMR/lazy compile#22745

Merged
sapphi-red merged 2 commits into
mainfrom
worktree-on-additional-assets
Jun 26, 2026
Merged

fix(bundled-dev): serve assets emitted during HMR/lazy compile#22745
sapphi-red merged 2 commits into
mainfrom
worktree-on-additional-assets

Conversation

@h-a-n-a

@h-a-n-a h-a-n-a commented Jun 23, 2026

Copy link
Copy Markdown
Member

In Full Bundle Mode, assets emitted while generating an HMR patch or compiling a lazy entry (e.g. an image newly imported by the changed/lazy module) never reached the dev consumer — those paths skip the generate stage, so they never fire onOutput, the only asset-delivery channel. The browser then 404s the asset until a full reload.

This adds an onAdditionalAssets dev callback that delivers those assets before the patch/lazy code reaches the client, so a consumer that serves built files (Vite) can serve them in time.

Fixes #22596

@h-a-n-a

h-a-n-a commented Jun 23, 2026

Copy link
Copy Markdown
Member Author

Blocked until rolldown/rolldown#9815 gets released

@h-a-n-a h-a-n-a changed the base branch from main to 06-24-chore_update_rolldown June 25, 2026 10:28
@h-a-n-a h-a-n-a force-pushed the worktree-on-additional-assets branch from 245bc43 to 3dfa64d Compare June 25, 2026 10:29
@shulaoda shulaoda force-pushed the 06-24-chore_update_rolldown branch from 27fbbfd to 9a37c5d Compare June 26, 2026 03:14
@h-a-n-a h-a-n-a changed the base branch from 06-24-chore_update_rolldown to main June 26, 2026 07:25
@h-a-n-a h-a-n-a force-pushed the worktree-on-additional-assets branch from 3dfa64d to 9cbaf60 Compare June 26, 2026 07:31
@h-a-n-a h-a-n-a marked this pull request as ready for review June 26, 2026 08:33
@h-a-n-a h-a-n-a requested a review from sapphi-red June 26, 2026 08:33
@sapphi-red sapphi-red added feat: bundled-dev p3-minor-bug An edge case that only affects very specific usage (priority) labels Jun 26, 2026
@sapphi-red sapphi-red enabled auto-merge (squash) June 26, 2026 09:51
@sapphi-red sapphi-red disabled auto-merge June 26, 2026 09:51
@sapphi-red sapphi-red changed the title fix(dev): serve assets emitted during HMR/lazy compile fix(bundled-dev): serve assets emitted during HMR/lazy compile Jun 26, 2026
@sapphi-red sapphi-red enabled auto-merge (squash) June 26, 2026 09:52
@sapphi-red sapphi-red merged commit 5876b2c into main Jun 26, 2026
23 of 24 checks passed
@sapphi-red sapphi-red deleted the worktree-on-additional-assets branch June 26, 2026 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feat: bundled-dev p3-minor-bug An edge case that only affects very specific usage (priority)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Static asset imports fail to load on first page load in dev mode with bundledDev: true

2 participants