vite-pwa / vite-plugin-pwa

Zero-config PWA for Vite
https://vite-pwa-org.netlify.app/
MIT License
3.16k stars 207 forks source link

I have an issue for new release of registerType: 'prompt', #770

Open samgholipoor opened 1 week ago

samgholipoor commented 1 week ago

Hi there.

I have an issue with : VitePWA({ registerType: 'prompt', })

when I wanna release new version to production, a user comes to my web-app after a long time, he can't load the app and the app is empty, because browser can't serve js files of previous releases and gets 404 (new assets overwrite the previous ones), and on the other hand the new service worker is downloaded and gets stuck and waiting for user accept.

I wanna know how to handle new release with prompt registerType?

userquin commented 1 week ago

Did you change from auto update to prompt?

Maybe you've your server serving assets with wrong cache headers, check deployment page in the docs.