feat: migre le site vers SvelteKit (Svelte 5, statique, zéro tiers)
- Rebuild complet SvelteKit 2 + Svelte 5 runes + TypeScript, adapter-static - Images self-hébergées optimisées au build (vite-imagetools), fonts Archivo/Inter en woff2 local — BunnyCDN et Google Fonts supprimés (corrige les 403 d'images) - Tokens charte OKI, thème sombre par défaut / clair opt-in, zéro emoji (set SVG) - Motion : KineticText (stagger syncopé gwoka), ScrollProgressBar, View Transitions - Village SVG isométrique pour les services hébergés + fallback accessible - PWA (manifest + SW hors-ligne), 404 en KA, CSP nettoyée (.htaccess + _headers) - Lighthouse mobile : 91/100/100/100 — JS initial 67 Ko gzip
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
import { sveltekit } from '@sveltejs/kit/vite';
|
||||
import { imagetools } from 'vite-imagetools';
|
||||
import { VitePWA } from 'vite-plugin-pwa';
|
||||
import { defineConfig } from 'vite';
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
sveltekit(),
|
||||
imagetools(),
|
||||
VitePWA({
|
||||
registerType: 'autoUpdate',
|
||||
// Pas d'injection par le plugin : l'enregistrement est le fichier statique
|
||||
// static/registerSW.js (chemins absolus), lié dans app.html — CSP script-src 'self'.
|
||||
injectRegister: false,
|
||||
// Le manifest est le fichier statique static/manifest.webmanifest,
|
||||
// déjà lié dans app.html — ne pas en générer un second.
|
||||
manifest: false,
|
||||
workbox: {
|
||||
// Fallback hors-ligne réservé aux navigations HTML :
|
||||
// les PDF presse et autres assets servis en navigation directe en sont exclus.
|
||||
navigateFallback: '/offline/index.html',
|
||||
navigateFallbackDenylist: [/^\/assets\//],
|
||||
globPatterns: ['**/*.{js,css,html,woff2,png,svg,ico,webmanifest}'],
|
||||
globIgnores: ['assets/press/**'],
|
||||
maximumFileSizeToCacheInBytes: 3 * 1024 * 1024,
|
||||
cleanupOutdatedCaches: true,
|
||||
clientsClaim: true,
|
||||
skipWaiting: true
|
||||
},
|
||||
devOptions: {
|
||||
enabled: false
|
||||
}
|
||||
})
|
||||
]
|
||||
});
|
||||
Reference in New Issue
Block a user