feat(pwa): manifest.webmanifest + icons + theme-color + Workbox SW
Phase 10: adds PWA manifest, placeholder icons (192/512), manifest/theme-color meta tags to both app layout files, and VitePWA plugin with manifest:false + Workbox runtimeCaching (CacheFirst assets, NetworkOnly HTML). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>main
parent
2a59c364f2
commit
ae19135e09
Binary file not shown.
|
After Width: | Height: | Size: 69 B |
Binary file not shown.
|
After Width: | Height: | Size: 69 B |
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"name": "Lernschiff",
|
||||
"short_name": "Lernschiff",
|
||||
"description": "Kinderlernplattform für 3–14 Jahre",
|
||||
"start_url": "/",
|
||||
"display": "standalone",
|
||||
"background_color": "#f0eee9",
|
||||
"theme_color": "#f0eee9",
|
||||
"lang": "de",
|
||||
"icons": [
|
||||
{
|
||||
"src": "/icons/icon-192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "/icons/icon-512.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
import { defineConfig } from 'vite';
|
||||
import laravel from 'laravel-vite-plugin';
|
||||
import tailwindcss from '@tailwindcss/vite';
|
||||
import { VitePWA } from 'vite-plugin-pwa';
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
|
|
@ -9,5 +10,28 @@ export default defineConfig({
|
|||
input: ['resources/css/app.css', 'resources/js/app.js', 'resources/js/auth.js'],
|
||||
refresh: true,
|
||||
}),
|
||||
VitePWA({
|
||||
registerType: 'autoUpdate',
|
||||
manifest: false,
|
||||
workbox: {
|
||||
runtimeCaching: [
|
||||
{
|
||||
urlPattern: /\.(?:js|css|woff2?|png|svg|ico)$/i,
|
||||
handler: 'CacheFirst',
|
||||
options: {
|
||||
cacheName: 'assets-cache',
|
||||
expiration: {
|
||||
maxEntries: 100,
|
||||
maxAgeSeconds: 60 * 60 * 24 * 30,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
urlPattern: /^https?:\/\/.+\/(?!api)/,
|
||||
handler: 'NetworkOnly',
|
||||
},
|
||||
],
|
||||
},
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue