code-splitting
/code-splitting
Use when reviewing large SPA bundles, new dependency additions, or routes that feel slow to hydrate. Focus on code that is not required for the initial view and can move behind route transitions, user interaction, or viewport-based loading.
- Author
- thedaviddias ↗
- Repository
- front-end-checklist ↗
- Licence
- MIT
- Last repository change
- 06.10.2026
Assessment and security
- Files in this package
- 2
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 2
No signals detected. Repository changed on 06.10.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Use when reviewing large SPA bundles, new dependency additions, or routes that feel slow to hydrate. Focus on code that is not required for the initial view and can move behind route transitions, user interaction, or viewport-based loading.
Original author description
Use when reviewing large SPA bundles, new dependency additions, or routes that feel slow to hydrate. Focus on code that is not required for the initial view and can move behind route transitions, user interaction, or viewport-based loading.
How it works
- Quick Reference
- Check
- Fix
- Explain
- Code Review
SKILL.md preview
--- name: code-splitting description: "Use when reviewing large SPA bundles, new dependency additions, or routes that feel slow to hydrate. Focus on code that is not required for the initial view and can move behind route transitions, user interaction, or viewport-based loading." metadata: category: javascript priority: high difficulty: intermediate estimatedTime: "25" source: frontendchecklist.io url: https://frontendchecklist.io/rules/javascript/code-splitting --- # Split large JavaScript bundles A 500 KB JavaScript bundle blocks page interactivity for 3–5 seconds on a mid-range mobile device even after the bytes arrive — JS must be parsed and compiled before execution. Code splitting means users only download and parse the code they actually need for the current page, dramatically improving Time to Interactive. ## Quick Reference - Use dynamic import() to load code only when it's actually needed - Split routes in SPAs so each page loads only its own code - Lazy-load heavy third-party libraries (chart libraries, rich text editors) - Analyze your bundle with a visualizer to find what to split ## Check Identify any large third-party imports or feature modules in this file that could be loaded lazily with dynamic import() instead of statically. ## Fix Convert the identified static imports to dynamic imports using import() and add appropriate loading states. ## Explain Explain JavaScript code splitting, how dynamic import() works, and how to implement route-based splitting in a SPA. ## Code Review Inspect route modules, heavy feature imports, and third-party libraries loaded on initial render. Flag dependencies that can move behind `import()`, route boundaries, or user-triggered flows without breaking the first meaningful paint. --- For full implementation details, code examples, and framework-specific guidance, see `references/rule.md`. Rule page: https://frontendchecklist.io/rules/javascript/code-splitting
Files in this package (2)
- SKILL.md 2 KB
- references/rule.md 4 KB
Versions
The database has no other skills named code-splitting.
Database snapshot: 13.11.2026 · package version 496179fbe15f (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100import-on-interaction
Use when reviewing slow initial loads caused by optional features. Prioritize code that is expensive to download or execute and not required for the first viewport, first input, or core task completion. - 100next-bundle-optimizer
Audit and reduce Next.js browser initial-load work. Use for slow route startup, oversized client bundles, duplicate browser dependencies, or features that can wait for interaction. - 100set-up-routing
Use when adding client-side routing to a frontend SPA — wires TanStack Router (typed, file-based, React) or Vue Router (Vue) with lazy route code-splitting, loaders that prefetch into the TanStack Query cache, per-route error + pending UI, and a guard pattern for protected routes. - 100vite-react-best-practices
Comprehensive React 19 and Vite 8 SPA performance, architecture, and deployment guidelines. Use this skill when building, reviewing, or refactoring React applications built with Vite (SPA). Covers Vite 8 build and static hosting requirements, React Router 8 route-level code… - 100audit-bundle-size
Analyse and shrink a web app's JavaScript bundle. Use when "reduce bundle size", "code splitting", "slow initial load", or "why is the bundle so big". Runtime → audit-performance. - 100react-performance-optimization
React performance optimization patterns using memoization, code splitting, and efficient rendering strategies. Use when optimizing slow React applications, reducing bundle size, or improving user experience with large datasets.