Files
2026-04-30 13:50:11 +09:00

50 lines
1.8 KiB
HTML
Executable File

<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>StemEngine</title>
<!-- PWA manifest -->
<link rel="manifest" href="/manifest.webmanifest" />
<!-- Favicon -->
<link rel="icon" href="/icon.svg" type="image/svg+xml" />
<!-- Theme color (browser chrome on Android, tab bar tint) -->
<meta name="theme-color" content="#3B82F6" />
<!-- iOS PWA -->
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<meta name="apple-mobile-web-app-title" content="StemEngine" />
<link rel="apple-touch-icon" href="/icon.svg" />
<!-- Dev-mode SW teardown: runs synchronously before any module import so the
service worker cannot intercept and serve stale cached bundles during
this navigation. main.tsx performs a second cleanup after window.load
as a belt-and-suspenders fallback, but this inline script is what
actually prevents the stale-cache race in development. In production
the SW re-registers via main.tsx on the same page load. -->
<script>
try {
if ('serviceWorker' in navigator) {
navigator.serviceWorker.getRegistrations().then(function (regs) {
regs.forEach(function (r) { r.unregister() })
})
}
if ('caches' in window) {
caches.keys().then(function (keys) {
keys.filter(function (k) {
return k.startsWith('stemengine-shell-') || k.startsWith('stemengine-static-')
}).forEach(function (k) { caches.delete(k) })
})
}
} catch (_) {}
</script>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>