A PWA needs a web app manifest (name, icons, colors, display: standalone) linked from index.html, and a service worker that serves the app offline. The CLI wrote both: src/manifest.json sets #b3541e colors and six icons from 128 to 512 px. The service worker is generated after each build by Workbox 13,023 (github.com/GoogleChrome/workbox (https://github.com/GoogleChrome/workbox 13,023 ), MIT; workbox-cli 7.4.1 here). workbox-config.js tells generateSW to scan www/ for **/*.{woff,woff2,js,css,png,jpg,svg,html} and write www/service-worker.js; the worker lists each file with a revision hash (the "15 URLs, totaling 1.99 MB" above), downloads them on install and answers from its cache first. Framework7 572,986 's serviceWorker parameter registers it:
// Only in a production build served over http(s): file:// (Electron, Section 2.16.8) has none
serviceWorker: process.env.NODE_ENV === 'production' && location.protocol.startsWith('http')
? { path: '/service-worker.js' } : {},The protocol test was added after the Electron 20,509 build logged Failed to register a ServiceWorker for scope ('file:///C:/'). Note that json is missing from the patterns, so the manifest is not precached, and that data from an API needs runtimeCaching rules, since the precache knows only build-time files.