diff --git a/package.json b/package.json index 85ef100..ed97aa0 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "app", "private": true, - "version": "0.2.1", + "version": "0.3.0", "type": "module", "scripts": { "dev": "vite dev", diff --git a/src/app.html b/src/app.html index 16a81e0..a0d5260 100644 --- a/src/app.html +++ b/src/app.html @@ -3,6 +3,15 @@
+ + diff --git a/vite.config.ts b/vite.config.ts index 364f664..e811ee0 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -15,7 +15,12 @@ export default defineConfig({ SvelteKitPWA({ srcDir: 'src', strategies: 'injectManifest', - registerType: 'prompt', + // `autoUpdate` silently replaces the SW as soon as a new version + // is detected, vs `prompt` which requires a user tap. iOS + // standalone PWAs can't easily surface that prompt (no reliable + // beforeinstallprompt-equivalent) and can get stuck on a broken + // old SW indefinitely — see github.com/sveltejs/svelte/issues/12313. + registerType: 'autoUpdate', injectManifest: { globPatterns: ['client/**/*.{js,css,ico,png,svg,webp,woff,woff2}'] },