A PWA is usually explained with one manifest and one service worker. That's fine until you serve many tenants from one installation — then every tenant needs its own app identity, its own icon label, its own start URL, and none of them should collide.
This post covers the parts that were not obvious: a per-tenant manifest, the id field that prevents duplicate home-screen icons, an update flow that doesn't destroy a half-filled booking form, and what should never be cached.
Setup
Vite 6 with vite-plugin-pwa , Workbox generateSW . The important setting is that the manifest is not generated at build time:
VitePWA ( { registerType : 'prompt' , manifest : false , // served by the API, per tenant workbox : { navigateFallbackDenylist : [ /^ \ / api \ //], runtimeCaching : [ ] // no API caching } } )
Enter fullscreen mode
Exit fullscreen mode
registerType: 'prompt' means a new service worker installs and then waits . It doesn't take over until the app tells it to.…