Fix: les PDF de règles ne se chargeaient plus dans la PWA
Build and Publish Docker Image / build-and-push-image (push) Successful in 1m45s

Ouvrir un PDF est une navigation : le repli SPA du service worker
(navigateFallback) répondait index.html à la place du fichier. Les assets
de jeux sont désormais exclus du repli.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Zed
2026-08-01 12:06:19 +02:00
parent 68e0f0b90b
commit 16ad86c019
+4 -2
View File
@@ -61,8 +61,10 @@ export default defineConfig({
}, },
], ],
navigateFallback: "/index.html", navigateFallback: "/index.html",
// Never let the SPA fallback swallow API calls. // Never let the SPA fallback swallow API calls, nor game assets:
navigateFallbackDenylist: [/^\/api/], // opening a rules PDF is a navigation, which would otherwise be
// answered with index.html instead of the file.
navigateFallbackDenylist: [/^\/api/, /^\/games-assets\//],
cleanupOutdatedCaches: true, cleanupOutdatedCaches: true,
}, },
}), }),