fix: detect CSS preload errors and keep banner visible during error states

- Add "unable to preload" pattern to isChunkError for Vite CSS preload failures
- Move ConnectionMonitor and ConnectionBanner outside ErrorBoundary so they
  remain visible when the error boundary catches a render crash
- Add test for CSS preload error retry
This commit is contained in:
ashim-hq
2026-04-21 00:01:59 +08:00
parent da52088e39
commit 70f9f3d51d
3 changed files with 49 additions and 30 deletions
+2 -1
View File
@@ -7,7 +7,8 @@ export function isChunkError(error: unknown): boolean {
msg.includes("dynamically imported module") ||
msg.includes("loading chunk") ||
msg.includes("loading css chunk") ||
msg.includes("failed to fetch")
msg.includes("failed to fetch") ||
msg.includes("unable to preload")
);
}