js-file-size
Installation
SKILL.md
Optimize JavaScript bundle size
Excessive JavaScript increases parse and execution time, especially on low-end devices, leading to sluggish user experiences and high data costs.
Quick Reference
- Keep individual JS bundles under 200KB (compressed)
- Large bundles delay Time to Interactive (TTI) and First Input Delay (FID)
- Use code-splitting and tree-shaking to reduce unused code
Check
Review the JavaScript bundle sizes and identify any files exceeding 200KB (Gzip/Brotli).
Fix
Implement code-splitting, tree-shaking, and dependency audits to reduce the size of the JavaScript bundles.