feat: add PWA support with offline capabilities

- Add web app manifest with icons and theme configuration
- Add service worker with cache-first strategy for static assets
- Add useServiceWorker hook for SW registration
- Add PWA meta tags and Apple-specific tags to index.html
- Update vite.config.ts for optimal asset caching
This commit is contained in:
Nunzio Marfè
2025-12-17 16:02:55 +01:00
parent f0647dc7c1
commit 425db33f5c
6 changed files with 247 additions and 3 deletions

View File

@@ -20,13 +20,14 @@ export default defineConfig({
base: "./",
build: {
sourcemap: false,
assetsInlineLimit: 0, // Ensure assets are not inlined for proper PWA caching
},
server: {
https: useHTTPS
? {
cert: fs.readFileSync(sslCertPath),
key: fs.readFileSync(sslKeyPath),
}
cert: fs.readFileSync(sslCertPath),
key: fs.readFileSync(sslKeyPath),
}
: false,
port: 5173,
host: "localhost",