) loads the client entry via a bare // `import(...)` with no `.catch()` - see @sveltejs/kit's // render.js. If the HTML was served referencing a chunk hash a // stale/rolling-deploy dyno no longer has on disk, that import // rejects before any of our own JS (hooks.client.js) has loaded, // so its `vite:preloadError`/`handleError` reload-once handling // never gets a chance to run - the failure only ever surfaces as // an unhandled promise rejection. Catch that case here, in a // plain non-module script that's active before the entry import // even starts, and reload once to pick up the current build. // Shares hooks.client.js's sessionStorage key so a genuinely // broken deploy still can't reload-loop the tab. window.addEventListener('unhandledrejection', function (event) { var message = String(event.reason && event.reason.message); if (!/(?:failed to fetch|error loading) dynamically imported module/i.test(message)) return; event.preventDefault(); if (sessionStorage.getItem('vite-preload-reloaded')) return; sessionStorage.setItem('vite-preload-reloaded', '1'); window.location.reload(); }); Teamstatistieken - Beker van Vlaams-Brabant U12 Gemengd Poule E | BasketballStatsVlaanderen %sveltekit.body%