#PWA
vite-plugin-pwa in generateSW mode with autoUpdate. The service worker
precaches the shell only and declares no runtime caching: Firestore keeps its own
offline queue in IndexedDB and talks over a long-lived stream, and a worker that
intercepted that would break sync in ways that look like data loss. It is enabled
in dev as well, so the end-to-end run exercises the registration path that ships.
The build splits vendor code into three chunks — react, firebase and antd
— via rolldown's codeSplitting groups in vite.config.ts, so an app-code
change re-downloads tens of kilobytes rather than the whole megabyte; the
service worker precaches all of them under the existing glob.
The icon set — favicon.png, icons/icon-192.png, icons/icon-512.png,
icons/maskable-512.png, icons/apple-touch-icon.png — is derived from one
source, art/app-icon.png, which deliberately lives outside public/:
everything under public/ ships and is precached, and the source is 1.4 MB.
Two treatments: the favicon and the "any"-purpose icons are cropped to the
art's tile with corners masked to transparency (they sit on arbitrary
surfaces); the maskable and apple-touch icons are the tile full-bleed on black
with no alpha, because those platforms cut their own shape and the art's
internal margins are the safe zone.