Skip to content

fix(web): reload on stale lazy-chunk load after deploy - #263

Merged
omegent-app[bot] merged 1 commit into
fork/changesfrom
fix/web-stale-chunk-reload
Jul 31, 2026
Merged

fix(web): reload on stale lazy-chunk load after deploy#263
omegent-app[bot] merged 1 commit into
fork/changesfrom
fix/web-stale-chunk-reload

Conversation

@omegent-app

@omegent-app omegent-app Bot commented Jul 31, 2026

Copy link
Copy Markdown

Summary

Open tabs keep hashed dynamic-import URLs from the previous build. After a deploy those chunks disappear, so opening DiffPanel / FilePreview crashes with Failed to fetch dynamically imported module.

Install Vite's vite:preloadError handler at app boot and reload (with a short cooldown so real outages do not spin) so the browser picks up the new index + asset map.

Test plan

  • vp test run apps/web/src/vitePreloadRecovery.test.ts
  • Manually: leave a web tab open across a rebuild/restart, open a lazy panel; tab should auto-reload instead of the root error screen

opened by enricopolanski in chat thread Discord · Discord · T3

Open tabs keep hashed dynamic-import URLs from the previous build; after a
deploy those chunks disappear and DiffPanel/FilePreview crash with
"Failed to fetch dynamically imported module". Listen for Vite's
vite:preloadError and reload once (with cooldown) so the new asset map loads.

Co-authored-by: Enrico Polanski <16064771+enricopolanski@users.noreply.github.com>
@omegent-app
omegent-app Bot marked this pull request as ready for review July 31, 2026 13:34
@omegent-app
omegent-app Bot enabled auto-merge (squash) July 31, 2026 13:35
@omegent-app
omegent-app Bot merged commit 534fb28 into fork/changes Jul 31, 2026
11 checks passed
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.

0 participants