diff --git a/pwa/index.html b/pwa/index.html index 94935d1..7440b65 100644 --- a/pwa/index.html +++ b/pwa/index.html @@ -8,9 +8,9 @@ Tilfluktsrom - - - + + +
@@ -63,6 +63,6 @@
- + diff --git a/pwa/public/manifest.webmanifest b/pwa/public/manifest.webmanifest index eff6a67..37b1419 100644 --- a/pwa/public/manifest.webmanifest +++ b/pwa/public/manifest.webmanifest @@ -2,20 +2,21 @@ "name": "Tilfluktsrom", "short_name": "Tilfluktsrom", "description": "Find the nearest public shelter in Norway", - "start_url": "/", + "start_url": ".", + "scope": ".", "display": "standalone", "orientation": "portrait", "theme_color": "#1A1A2E", "background_color": "#1A1A2E", "icons": [ { - "src": "/icons/icon-192.png", + "src": "icons/icon-192.png", "sizes": "192x192", "type": "image/png", "purpose": "any maskable" }, { - "src": "/icons/icon-512.png", + "src": "icons/icon-512.png", "sizes": "512x512", "type": "image/png", "purpose": "any maskable" diff --git a/pwa/vite.config.ts b/pwa/vite.config.ts index 6be5179..8d5b971 100644 --- a/pwa/vite.config.ts +++ b/pwa/vite.config.ts @@ -2,6 +2,7 @@ import { defineConfig } from 'vite'; import { VitePWA } from 'vite-plugin-pwa'; export default defineConfig({ + base: './', define: { // Injected as a global — changes every build, breaking any stale cache __BUILD_REVISION__: JSON.stringify( @@ -21,7 +22,7 @@ export default defineConfig({ cleanupOutdatedCaches: true, // SPA: serve index.html for all navigation requests - navigateFallback: '/index.html', + navigateFallback: 'index.html', // Vite already hashes JS/CSS filenames — skip Workbox's // cache-bust query parameter for those