vite-pwa / vite-plugin-pwa

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

Prompt- Reload - not reloading #717

Open elvince opened 1 month ago

elvince commented 1 month ago

Hi,

Thanks for this plugin.

I follow all the instructions and look at your react samples on how to implement the update prompt. Everything is working as expected except the "reload" part. When I call updateServiceWorker(true), nothing hapenned. I had to call window.location.reload(); for the refresh to happenned. Without the reload part, even a "normal F5 refresh" was not working as if the worker was in a waiting state and can't move out of it.

Any hints?

Just in case it helps, during the build I had a warning on my main js file that won't be precached. Configure maximumFileSizeToCacheInBytes to change this limit.

Thanks,

userquin commented 1 month ago

Try to provide a minimal reproduction, you can use the new create-pwa https://vite-pwa-org.netlify.app/guide/scaffolding.html

About the warbing : https://vite-pwa-org.netlify.app/guide/faq.html