Files
cluedo-hp-webapp/frontend/vite.config.js
nessi 6434256dfb Set dynamic theme color for PWA and Android status bar.
Added logic to update the theme-color meta tag dynamically based on the active theme. This improves the visual consistency of the application, particularly for PWA and Android users. Default theme color has also been updated in the configuration.
2026-02-06 18:39:04 +01:00

38 lines
1.0 KiB
JavaScript

import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import { VitePWA } from "vite-plugin-pwa";
export default defineConfig({
plugins: [
react(),
VitePWA({
registerType: "autoUpdate",
includeAssets: [
"favicon.ico",
"icons/icon-512.png",
"marauders-map.jpg" // oder dein Hintergrund
],
manifest: {
name: "Zauber-Detektiv Notizbogen",
short_name: "Notizbogen",
description: "Cluedo-Magie Sheet",
start_url: "/",
scope: "/",
display: "standalone",
background_color: "#1c140d",
theme_color: "#000000",
icons: [
{ src: "/icons/icon-512.png", sizes: "512x512", type: "image/png" }
]
},
workbox: {
// Caching-Default: die App-Shell wird offline verfügbar
globPatterns: ["**/*.{js,css,html,ico,png,jpg,jpeg,svg,webp}"],
cleanupOutdatedCaches: true,
skipWaiting: true,
clientsClaim: true,
}
})
]
});