vite-pwa / sveltekit

Zero-config PWA Plugin for SvelteKit
https://vite-pwa-org.netlify.app/frameworks/sveltekit
MIT License
324 stars 15 forks source link

generateSW is not working in version 0.2.0 #37

Closed hawk93 closed 1 year ago

hawk93 commented 1 year ago

When building the application manifest.webmanifest file is added twice to cached file list, that causes an error and the app become unavailable offline.

I created a repo using the official sveltekit skeleton app and a minimal configuration that you can use to verify the problem. You just need to build and preview the application to obtain the error:

Uncaught (in promise) add-to-cache-list-conflicting-entries: add-to-cache-list-conflicting-entries

userquin commented 1 year ago

@hawk93 checking latest kit changes, it is weird, the example here using kit v1.11.0 is working...

userquin commented 1 year ago

ok, the problem is there, the web manifest is added twice, but with your reproduction the hash changes, and that's the problem, using the example here works with duplicated entry:

imagen

userquin commented 1 year ago

@hawk93 your repro using local copy from #38, web manifest added only once, I'm going to publish a new patch version:

imagen

userquin commented 1 year ago

tested also with new patch version: https://github.com/vite-pwa/sveltekit/releases/tag/v0.2.1

hawk93 commented 1 year ago

@userquin I tested it too. It works now