mirror of
https://github.com/Moepchi/webspeak3.git
synced 2026-12-03 01:42:50 +08:00
Add PWA installability (manifest + service worker)
- Wire up vite-plugin-pwa: generates a web app manifest and a precache-only service worker for the built app shell (JS/CSS/HTML/ icons). WebSocket (/ws) and file-transfer traffic are never intercepted or cached. Disabled in dev so it doesn't interfere with Vite's own HMR websocket. - Add 512px + maskable 512px icons generated from the existing logo. - Add iOS "Add to Home Screen" meta tags (manifest support there is partial). - Gateway: serve .webmanifest with the correct MIME type.
This commit is contained in:
1 parent
20d1944dc9
commit
48f5e35a38
7 files changed
+5360
-3
No files matched your search
@@ -41,6 +41,7 @@ const MIME_TYPES: Record<string, string> = {
|
||||
".ico": "image/x-icon",
|
||||
".json": "application/json",
|
||||
".woff2": "font/woff2",
|
||||
".webmanifest": "application/manifest+json",
|
||||
};
|
||||
|
||||
const DEV_HINT = `<!doctype html><html><body style="font:14px system-ui;padding:2rem;max-width:40rem">
|
||||
|
||||
Reference in new issue
Block a user