diff --git a/index.html b/index.html index 932ebc2..30c90af 100644 --- a/index.html +++ b/index.html @@ -7,7 +7,7 @@ - + @@ -33,14 +33,25 @@ - - + + +
- + + diff --git a/package.json b/package.json index 12c787f..1048b52 100644 --- a/package.json +++ b/package.json @@ -11,8 +11,7 @@ "lint": "eslint .", "preview": "vite preview", "optimize-images": "node scripts/optimize-images.js", - "analyze": "node scripts/analyze-bundle.js", - "analyze:js": "node scripts/analyze-js-bundle.js" + "analyze": "node scripts/analyze-bundle.js" }, "dependencies": { "@hookform/resolvers": "^3.10.0", diff --git a/src/App.tsx b/src/App.tsx index 5d9bd8e..594f1a8 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -6,30 +6,15 @@ import { createBrowserRouter, RouterProvider } from "react-router-dom"; import { lazy, Suspense } from "react"; import { ThemeProvider } from "./contexts/ThemeContext"; -// Lazy load pages et composants lourds pour de meilleures performances -// Cela réduit la quantité de JavaScript chargé initialement +// Lazy load pages and heavy components for better performance const Index = lazy(() => import("./pages/Index")); const ProjectPage = lazy(() => import("./pages/ProjectPage")); const NotFound = lazy(() => import("./pages/NotFound")); +const ParticlesBackground = lazy(() => import("./components/ParticlesBackground").then(m => ({ default: m.ParticlesBackground }))); -// ParticlesBackground est chargé en lazy car non critique pour le FCP/LCP -const ParticlesBackground = lazy(() => - import("./components/ParticlesBackground").then(m => ({ default: m.ParticlesBackground })) -); +const queryClient = new QueryClient(); -// Configuration QueryClient optimisée -const queryClient = new QueryClient({ - defaultOptions: { - queries: { - staleTime: 1000 * 60 * 5, // 5 minutes - gcTime: 1000 * 60 * 10, // 10 minutes - refetchOnWindowFocus: false, - retry: 1, - }, - }, -}); - -// Loading fallback component minimal +// Loading fallback component const PageLoader = () => (