Summary
All route components are eagerly imported in App.tsx. The main JS chunk is 493KB (169KB gzipped). Since most users land on either the Press (reading) or Editor (writing) view, we should lazy-load routes.
Implementation
const Press = React.lazy(() => import("./components/Press"))
const ArticleReader = React.lazy(() => import("./components/ArticleReader"))
const Settings = React.lazy(() => import("./components/Settings"))
const AuthCallback = React.lazy(() => import("./components/AuthCallback"))
- Wrap routes in
<Suspense fallback={<LoadingSkeleton />}>
- Editor can stay eagerly loaded (primary use case)
- Tiptap chunk (395KB) only loads when editor mounts
Acceptance Criteria
Summary
All route components are eagerly imported in
App.tsx. The main JS chunk is 493KB (169KB gzipped). Since most users land on either the Press (reading) or Editor (writing) view, we should lazy-load routes.Implementation
<Suspense fallback={<LoadingSkeleton />}>Acceptance Criteria