Feat/mos 0013#18
Merged
Merged
Conversation
- Install vite-plugin-pwa and @vite-pwa/assets-generator as dev deps - Configure VitePWA plugin in vite.config.ts with: - registerType: 'autoUpdate' for seamless SW updates - Inline manifest with app metadata, icons, screenshots, shortcuts - Workbox precaching for all static assets (js, css, html, svg, png, woff2) - Runtime caching: NetworkFirst for /api/, CacheFirst for Google Fonts - navigateFallback for SPA routing with API denylist - Remove broken hand-written service-worker.js (cached source paths) - Remove old manifest.json (referenced non-existent icon files) - Remove vite.svg (replaced with app favicon.svg) - Create favicon.svg from Logo component (green M with growth arrow) - Clean index.html: remove manual manifest/apple-touch-icon/MS tile tags (vite-plugin-pwa injects these automatically) - Remove manual SW registration from main.tsx (vite-plugin-pwa handles registration via virtual module) 107 tests passing, tsc clean
- Use @vite-pwa/assets-generator (minimal preset) to generate icons: - pwa-64x64.png, pwa-192x192.png, pwa-512x512.png (standard) - maskable-icon-512x512.png (maskable for Android adaptive icons) - apple-touch-icon-180x180.png (iOS home screen) - favicon.ico (legacy browser fallback) - Update favicon.svg: add background rect, fix camelCase attrs, 512x512 base - Add head links for favicon.ico + apple-touch-icon in index.html - Generate placeholder screenshots (desktop 1280x720, mobile 390x844) using sharp branded with Moshimo name and accent color - All icon sizes match manifest.icons entries in vite.config.ts
- Add npm script 'generate-pwa-assets' for regenerating icons from SVG (runs: pwa-assets-generator -p minimal public/favicon.svg) - Remove PWA_ICONS_GUIDE.md icon generation is now automated - Verified production build: 25 precached entries, SW + workbox generated - Manifest, registerSW, and head tags injected correctly by plugin 107 tests passing, tsc clean, build verified
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.