A performance budget tool for JavaScript that calculates the real cost of your JS and enforces limits on CI.
Size Limit is a performance budget tool for JavaScript that calculates the real-world cost of your JavaScript bundles. It helps developers enforce size limits on their applications and libraries by integrating with CI systems to prevent performance regressions. The tool goes beyond simple byte counts to measure execution time and supports modern JavaScript features like ES modules and tree-shaking.
JavaScript developers and teams building web applications or libraries who need to maintain performance standards and prevent bundle bloat. It's particularly valuable for projects with strict performance requirements or those publishing to npm.
Developers choose Size Limit because it provides actionable, time-based performance metrics rather than just byte counts, integrates seamlessly into CI workflows to catch regressions early, and offers a modular plugin system that adapts to different project types from small libraries to large applications.
Calculate the real cost to run your JS app or lib to keep good performance. Show error in pull request if the cost exceeds the limit.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Goes beyond raw byte size by measuring actual execution time in browsers using headless Chrome, providing a more realistic cost estimate for end-users, as highlighted in the README's emphasis on time-to-interactive.
Integrates with GitHub Actions and other CI systems to block pull requests that exceed limits and post detailed bundle size change comments, automating performance enforcement as shown in the example workflows.
Offers tailored presets for apps, big libraries, and small libraries, plus plugins for webpack, esbuild, and time calculations, allowing customization for diverse project needs without unnecessary bloat.
Includes all dependencies and polyfills in size calculations and provides the --why flag with Statoscope integration to break down bundle composition and identify bloated dependencies.
Execution time calculations rely on headless Chrome and machine performance, leading to potential fluctuations and non-reproducible results, as the README admits dependencies on available resources.
Primarily supports webpack and esbuild via plugins; projects using other bundlers like Rollup or Parcel require custom configurations or third-party plugins, adding setup complexity.
Advanced use cases, such as custom webpack configs or TypeScript setups, necessitate manual modifications and deeper expertise, which can be daunting compared to simpler size-check tools.
Focuses exclusively on JavaScript bundles; while CSS can be analyzed with plugins, other assets like images or fonts are not natively covered, limiting holistic performance budgeting.