Size Limit is a performance budget tool for JavaScript that checks every commit on CI, calculates the real cost of your JS for end-users, and throws an error if the cost exceeds the limit.
The tool solves the problem of uncontrolled bundle growth by measuring the actual performance impact of code changes rather than just file size. It calculates execution time in the browser, accounting for download speed and parsing overhead, which provides a more meaningful metric than bytes alone. The approach works by integrating into CI systems like GitHub Actions and Circle CI to automatically check pull requests, and it includes all dependencies and polyfills in its calculations. The tool can also analyze why your library has reached a certain size using the --why flag, which leverages Statoscope to show the real cost of internal dependencies.
Size Limit suits both large JavaScript applications with custom bundlers and small npm libraries with many files, thanks to its modular design. It supports ES modules and tree-shaking, ensuring accurate measurements of what actually ships to users. The tool integrates directly into pull request workflows, posting bundle size changes as comments so developers see the impact immediately. This approach is particularly valuable for library maintainers who need to prevent accidental bloat and for teams maintaining performance budgets across large applications.
The project shows consistent maintenance with regular updates addressing both bug fixes and feature enhancements. Development activity demonstrates responsiveness to user issues and pull requests, with a focus on keeping the tool reliable for CI integration. The codebase maintains compatibility with multiple CI platforms and bundler configurations, indicating attention to the diverse needs of its user base.