Joaquín Sánchez

Results 1398 comments of Joaquín Sánchez

@hamishjohnson you should exclude any dynamic route adding offline support for those routes or api calls EDIT: for example, in elk repo we exclude a few api and routes from...

we don't have those packages installed: https://github.com/vite-pwa/sveltekit/blob/main/package.json#L52-L71

@udos86 You're using static imports, you need to add `type: 'module'` to `devOptions`, will work only on chromium based browsers. Since you're using TypeScript you need to specify `srcDir: './src',`...

> Also I noticed, that the service worker is always running in development regardless of wether enabled is true or false in devOptions. you must also disable kit sw registration...

We're trying to expose kit configuration (on kit repo), and so ppl won't need to duplicate configuration between kit and vite, pwa integration will use it to configure a lot...

https://vite-pwa-org.netlify.app/guide/static-assets.html `publicDir` in kit is static folder

You should prerender navigate fallback page for offline support, I guess the warning is about missing html entries in prerendered folder. You sw will fail when registeribg since there is...

https://github.com/vite-pwa/vite-plugin-pwa/issues/402#issuecomment-1295168405 (you also need to exclude html files, include `globIgnores: ["prerendered/**/*.html"` iirc glob ignores takes preferences over glog includes)

You should exclude server pages from the sw interception and use NetworkFirst/NetworkOnly runtime cahcing handler, checking for offline in the page (or before allowing the user navigating to those ssr...

If you're using `injectManifest` strategy (custom sw), you've the equivalent via `import { registerRoute } from 'workbox-routing'`, here an example, also with the corresponding `denylist => navegateFallbackDenylist` : https://github.com/elk-zone/elk/blob/main/service-worker/sw.ts