bump-size-limit

Adjust bundle size limits in `.size-limit.js` when CI checks fail.

8.7k|1.8k|Updated Feb 1, 2012
One-click install
npx skills add https://github.com/getsentry/sentry-javascript --skill bump-size-limit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bump-size-limit
Source: https://github.com/getsentry/sentry-javascript/tree/main/.agents/skills/bump-size-limit
Command: npx skills add https://github.com/getsentry/sentry-javascript --skill bump-size-limit

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill resolves issues where the size-limit GitHub Action fails due to exceeding configured bundle size thresholds.

Core Features & Use Cases

  • Automated Limit Bumping: Identifies and updates failing size limits in .size-limit.js.
  • Precise Adjustments: Calculates new limits by rounding actual sizes up to the nearest KB.
  • Use Case: When your CI pipeline reports a bundle size error, use this Skill to automatically adjust the limits and get your build passing again.

Quick Start

Use the bump-size-limit skill to fix the failing size limit checks.

Frequently Asked Questions about bump-size-limit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix a failing size limit check in CI?

To fix a failing size limit check, you need to adjust the bundle size thresholds in your `.size-limit.js` configuration file. This process involves executing build and size-limit test commands to measure the actual bundle size and update the byte thresholds accordingly.

What is the best way to update size-limit configuration when bundle size exceeds the threshold?

The best way to update size-limit configuration is to calculate new limits by rounding the actual bundle sizes up to the nearest KB. You can automate this adjustment in the `.size-limit.js` file to address bundle size threshold breaches and get your CI pipeline passing again.

Why does my size-limit GitHub Action fail during the build process?

Your size-limit GitHub Action fails because the build output exceeds the configured bundle size thresholds. When the JavaScript bundle size breaches the limit defined in `.size-limit.js`, the CI check automatically stops the pipeline to prevent performance regressions.

Do I need to run build commands before adjusting bundle size limits?

Yes, you need to execute build and size-limit test commands before adjusting bundle size limits. Running the build generates the current JavaScript bundle, allowing you to accurately measure the actual byte size and calculate the updated threshold.

How are the new byte thresholds calculated when bumping size limits?

New byte thresholds are calculated by measuring the actual bundle size and rounding the value up to the nearest KB. This precise adjustment ensures the updated `.size-limit.js` configuration accommodates the current build output while maintaining a strict size limit.

Can I use this approach to automatically bump size limits for JavaScript bundle size errors?

Yes, you can automate bumping size limits for JavaScript bundle size errors. The automated limit bumping identifies failing size limits in `.size-limit.js` and adjusts the thresholds to resolve CI pipeline failures caused by bundle size threshold breaches.