sfreytag / laravel-vite-pwa

Example of Laravel + Vite + vite-plugin-pwa
17 stars 5 forks source link

Does this setup also handle automatic updates, or displays a prompt to update when a new version is deployed? #3

Closed vesper8 closed 1 week ago

vesper8 commented 1 week ago

This is the bit I'm struggling with the most. When I deploy a new version, I want my users to be shown a prompt letting them know that a new version is available with a button for them to install the new version.

Does this setup include this functionality or not at all?

And in the context of detecting this update following a deployment, there are some guidelines here https://vite-pwa-org.netlify.app/deployment/nginx.html that explain how the nginx template must be modified to ensure that certain things are never cached and that the correct mime types are returned.

Many thanks!

sfreytag commented 1 week ago

Yep it does. Dig into showRefresh, seen here in the view: https://github.com/sfreytag/laravel-vite-pwa/blob/main/resources/js/components/PwaStatus.vue