indico / indico-checkin-pwa

MIT License
2 stars 5 forks source link

Replace CRA SW with VitePWA SW #72

Closed AjobK closed 3 weeks ago

AjobK commented 1 month ago

Context Currently we use the generated CRA SW. We want to auto-generate it with VitePWA.

We attempted this, but for some reason the registerSW({immediate: true}) flag does not work. In the vite.config.ts we also defined skipWaiting: true and clientClaim: true. When using the generated SW, when we have two clients locally running the same app, they refuse to update. In the application context it shows that they are still waiting and it requires us to close one of the apps and refresh, or click skipwaiting manually in the console.

This is something to come back to, but as it was taking a lot of time and preventing Vite from being made, it is now a separate issue.

Progress branch The AjobK/indico-checkin-pwa/tree/transition-to-vite-pwa branch on my own repo is a good baseline to start as I already tried a lot there. I will keep it alive, but keep in mind that it is likely severely outdated (last update on 17/09/2024).