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).
This commit is contained in:
Fringg
2026-02-25 08:22:24 +03:00
parent 962dd43756
commit 5c1be1471e

View File

@@ -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'));