Open leonwang908 opened 5 months ago
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 no navigate fallback in sw precache manifest.
My apps is forum app and it's no need to work under offline. is that any option to disable offline support?
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)
understand. let me try in maintenance time
workbox: {
globPatterns: ['client/**/*.{js,css,ico,png,svg,webp,woff,woff2}'],
globIgnores: ["prerendered/**/*.html"]
},
I added globIgnores: ["prerendered/*/.html"] to vite.config.ts and it looks not effected. it show me warning like
PWA v0.19.7
mode generateSW
precache 91 entries (1656.24 KiB)
files generated
.svelte-kit/output/server/sw.js
.svelte-kit/output/server/workbox-f3e6b16a.js
warnings
One of the glob patterns doesn't match any files. Please remove or fix the following: {
"globDirectory": "/home/hogehoge/.svelte-kit/output",
"globPattern": "prerendered/**/*.html",
"globIgnores": [
"prerendered/**/*.html",
"server/*.*",
"server/sw.js",
"server/workbox-*.js"
]
}
I have this error too, it seems like the options in vite.config.js
are ignored 🤔
here is log from console.
here is log from brower
here is my setting