diff --git a/src/setup/pwa.ts b/src/setup/pwa.ts index 44b4b776..e7147ea9 100644 --- a/src/setup/pwa.ts +++ b/src/setup/pwa.ts @@ -1,4 +1,3 @@ -/* eslint-disable no-console */ import { registerSW } from "virtual:pwa-register"; const intervalMS = 60 * 60 * 1000; @@ -6,10 +5,8 @@ const intervalMS = 60 * 60 * 1000; registerSW({ immediate: true, onRegisteredSW(swUrl, r) { - console.log(`SW registered at: ${swUrl}`); if (!r) return; setInterval(async () => { - console.log(`attempting SW update`); if (!(!r.installing && navigator)) return; if ("connection" in navigator && !navigator.onLine) return; @@ -23,7 +20,6 @@ registerSW({ }); if (resp?.status === 200) { - console.log(`SW update successfully triggered`); await r.update(); } }, intervalMS); diff --git a/vite.config.ts b/vite.config.ts index 35e32efa..4fbb2776 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -42,6 +42,7 @@ export default defineConfig(({ mode }) => { disable: process.env.VITE_PWA_ENABLED !== "yes", registerType: "autoUpdate", workbox: { + maximumFileSizeToCacheInBytes: 4000000, // 4mb globIgnores: ["**ping.txt**"] }, includeAssets: [