diff --git a/vite.config.ts b/vite.config.ts index 08480ed..db17707 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -61,8 +61,10 @@ export default defineConfig({ }, ], navigateFallback: "/index.html", - // Never let the SPA fallback swallow API calls. - navigateFallbackDenylist: [/^\/api/], + // Never let the SPA fallback swallow API calls, nor game assets: + // 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, }, }),