Files
Skori/vite.config.ts
T
Zed 1f400b78cb
Build and Publish Docker Image / build-and-push-image (push) Successful in 59s
Refonte UI : DA Strava + Kurzgesagt
- Nouveau logo planète flat (PlanetMark) + icônes PWA régénérées + splash navy cosmique
- Tokens de thème unifiés : accent teal de marque, rayons plus doux, dark mode cosmique (surfaces élevées)
- Fond CosmicBackground raffiné (halos aurora teal/indigo)
- Navigation par barre d'onglets en bas (BottomNav) ; menu ☰ réduit au secondaire
- Composants partagés PageHeader + SessionCard
- Accueil = dashboard : tuiles de stats + démarrage rapide + feed d'activité
- Stats : classement en barres horizontales (teinte unique, méthode dataviz)
- Restyle de tous les écrans liste + boucle de jeu immersive conservée
- Doc du format de création de jeu (docs/creation-jeu.md)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-11 11:42:15 +02:00

86 lines
2.4 KiB
TypeScript

import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import { VitePWA } from "vite-plugin-pwa";
import path from "path";
export default defineConfig({
plugins: [
react(),
VitePWA({
registerType: "autoUpdate",
includeAssets: ["favicon.ico", "apple-touch-icon.png"],
manifest: {
name: "Skori — Scores de jeux de société",
short_name: "Skori",
description:
"Application Web de gestion des scores pour jeux de société",
lang: "fr",
start_url: "/",
scope: "/",
display: "standalone",
orientation: "portrait",
theme_color: "#0f766e",
background_color: "#0b1120",
categories: ["games", "utilities"],
icons: [
{
src: "pwa-192x192.png",
sizes: "192x192",
type: "image/png",
},
{
src: "pwa-512x512.png",
sizes: "512x512",
type: "image/png",
},
{
src: "pwa-maskable-512x512.png",
sizes: "512x512",
type: "image/png",
purpose: "maskable",
},
],
},
workbox: {
// Précache le shell de l'app + les logos/bannières (légers, en webp)
globPatterns: ["**/*.{js,css,html,ico,png,svg,webp,woff2}"],
// Les PDF de règles (jusqu'à 12 Mo) ne sont PAS précachés :
// ils sont mis en cache à la demande, à la première consultation.
runtimeCaching: [
{
urlPattern: /\/games-assets\/.*\.pdf$/,
handler: "CacheFirst",
options: {
cacheName: "rules-pdf",
expiration: {
maxEntries: 10,
maxAgeSeconds: 60 * 60 * 24 * 90, // 90 jours
},
cacheableResponse: { statuses: [0, 200] },
},
},
],
navigateFallback: "/index.html",
// Never let the SPA fallback swallow API calls.
navigateFallbackDenylist: [/^\/api/],
cleanupOutdatedCaches: true,
},
}),
],
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
},
},
server: {
// Dev: forward /api to the backend so the browser sees a single origin
// (required for the httpOnly refresh cookie to work end-to-end).
proxy: {
"/api": {
target: "http://localhost:3001",
changeOrigin: true,
},
},
},
});