Implement code splitting in a frontend
Split a frontend app's bundle by route and third-party library, add prefetch hints, and configure chunk naming. Shows before/after bundle analysis.
Preview
Copy prompt
Implement route-level and library-level code splitting for a [Framework] app to reduce initial bundle size. Split each route with dynamic import(). Move heavy third-party libraries not needed on initial load into async chunks. Add prefetch hints for likely-next routes. Configure chunk naming in [webpack / vite] for readability. Show a before-and-after bundle analysis comparing total initial transfer size.
More
Performance
Prompts
