Skip to content

Feat/mos 0013#18

Merged
Lidizz merged 3 commits into
mainfrom
feat/MOS-0013
Feb 28, 2026
Merged

Feat/mos 0013#18
Lidizz merged 3 commits into
mainfrom
feat/MOS-0013

Conversation

@Lidizz
Copy link
Copy Markdown
Owner

@Lidizz Lidizz commented Feb 28, 2026

No description provided.

Lidizz added 3 commits March 1, 2026 00:50
- 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
@Lidizz Lidizz merged commit fad47b0 into main Feb 28, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant