mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[PR #6687] [CLOSED] Reload once when a lazy chunk fails to load after an upgrade #6412
Labels
No labels
backlog
bug
clarification needed
documentation
duplicate
enhancement
github_actions
good first issue
invalid
javascript
New Feature
PR welcomed
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MHSanaei/3x-ui#6412
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/MHSanaei/3x-ui/pull/6687
Author: @freeb5d
Created: 9/29/2026
Status: ❌ Closed
Base:
main← Head:fix/reload-on-stale-chunk📝 Commits (2)
6f0d888Reload once when a lazy chunk fails to load after an upgraded13ddb6fix(frontend): allow a stale-chunk reload again after a quiet period📊 Changes
3 files changed (+67 additions, -0 deletions)
View changed files
➕
frontend/src/lib/chunk-reload.ts(+17 -0)📝
frontend/src/main.tsx(+13 -0)➕
frontend/src/test/chunk-reload.test.ts(+37 -0)📄 Description
Refs #6673
Problem
A panel tab left open across an upgrade requests hashed chunk files (e.g.
XrayPage-*.js) that the new build no longer serves, so the user sees "Failed to fetch dynamically imported module" / the router error page until they hard-refresh. As noted on the issue there is novite:preloadErrorhandling.Change
frontend/src/main.tsxlistens forvite:preloadErrorand reloads the page once (guarded by asessionStorageflag so a genuinely missing file cannot cause a reload loop).Testing
Not run: no frontend build or browser check in my environment. Please rely on CI.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.