fix: stale SW chunks serving HTML, PWA cache cleanup, server asset routing
- Server SPA fallback now returns 404 for missing .js/.css assets instead of index.html - Prevents "Unexpected token '<'" errors from stale chunk URLs - Serve PWA files (sw.js, workbox, icons) with correct cache headers - Workbox: cleanupOutdatedCaches, skipWaiting, clientsClaim for instant SW updates - navigateFallbackDenylist for /api/ routes - AudioContext comment clarification Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
20e9f0f7a2
commit
7d5f4a6b8d
@@ -5,6 +5,9 @@ let sfxGain: GainNode | null = null
|
||||
let musicPlaying = false
|
||||
let musicTimeout: number | null = null
|
||||
|
||||
// Lazily create AudioContext + gain nodes on first use.
|
||||
// Chrome may warn about autoplay policy but the context will resume once ensureAudioContext()
|
||||
// is called from a user gesture. All SFX calls before that are queued/silent.
|
||||
function getCtx(): AudioContext {
|
||||
if (!ctx) {
|
||||
ctx = new AudioContext()
|
||||
|
||||
Reference in New Issue
Block a user