⚡ Bolt: Implement route-based code splitting to reduce initial bundle size by ~76% - #7
⚡ Bolt: Implement route-based code splitting to reduce initial bundle size by ~76%#7Pmaster-dev wants to merge 1 commit into
Conversation
…ction Implement route-level code splitting in App.tsx using React.lazy and Suspense. Reduces initial index JS bundle size from 1,695.78 kB down to 404.04 kB (gzip 441 kB -> 129 kB). Co-authored-by: Pmaster-dev <293764797+Pmaster-dev@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
💡 What: Implemented route-based code splitting for all page components (
Dashboard,MainframeDashboard,WebhookManagement,AccessibilityPage,PricingPage,IndividualIdPage,DisasterRecoveryPage,SitemapPage,NotFound) inclient/src/App.tsxusingReact.lazy()and React<Suspense>.🎯 Why: Previously, all page components were statically imported into
App.tsx, causing Vite to bundle every page (including large dashboard components) into a single monolithic entry chunk (index-Be6dlU1K.js). This forced users to download almost 1.7MB of JavaScript before rendering the application.📊 Impact:
Dashboard: 949 kB,MainframeDashboard: 99 kB,WebhookManagement: 29 kB, etc.).🔬 Measurement: Verify by running
pnpm build:clientand observing the output chunk sizes fordist/public/assets/index-*.js.PR created automatically by Jules for task 6792838554129157985 started by @Pmaster-dev