From 5c1be1471e8b372bd6aec5470b0fdadf037cffbb Mon Sep 17 00:00:00 2001 From: Fringg Date: Wed, 25 Feb 2026 08:22:24 +0300 Subject: [PATCH] perf: eagerly load Dashboard to improve LCP on main route Dashboard is the default landing page for all authenticated users. Loading it eagerly eliminates one extra network round-trip for the JS chunk (+30KB / +7KB gzip to main bundle, but saves ~200-500ms of chunk fetch + parse time on first load). --- src/App.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/App.tsx b/src/App.tsx index a9214ff..916a3bf 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -21,8 +21,10 @@ import VerifyEmail from './pages/VerifyEmail'; import ResetPassword from './pages/ResetPassword'; import OAuthCallback from './pages/OAuthCallback'; +// Dashboard - load eagerly (default route, LCP-critical) +import Dashboard from './pages/Dashboard'; + // User pages - lazy load -const Dashboard = lazy(() => import('./pages/Dashboard')); const Subscription = lazy(() => import('./pages/Subscription')); const Balance = lazy(() => import('./pages/Balance')); const Referral = lazy(() => import('./pages/Referral'));