Skip to content

Add bundle size monitoring with size-limit#43

Draft
fwal wants to merge 1 commit into
nextfrom
claude/trusting-ritchie-BtaSe
Draft

Add bundle size monitoring with size-limit#43
fwal wants to merge 1 commit into
nextfrom
claude/trusting-ritchie-BtaSe

Conversation

@fwal
Copy link
Copy Markdown
Owner

@fwal fwal commented May 22, 2026

Summary

This PR adds automated bundle size monitoring to the project using size-limit. A GitHub Actions workflow will now check bundle sizes on pull requests to help prevent unintended size regressions.

Key Changes

  • Added size-limit configuration (.size-limit.json): Defines bundle size limits for all four packages:

    • effect-firebase
    • @effect-firebase/admin
    • @effect-firebase/client
    • @effect-firebase/mock
    • Each entry specifies the entry point and external dependencies to ignore in size calculations
  • Added GitHub Actions workflow (.github/workflows/size.yml): Automatically runs on pull requests to main and next branches

    • Uses size-limit-action to check bundle sizes
    • Reports results directly as PR comments
    • Configured to skip the build step (assumes pre-built artifacts)
  • Updated package.json:

    • Added size npm script that runs size-limit
    • Added size-limit and @size-limit/preset-small-lib as dev dependencies

Implementation Details

  • The workflow uses pnpm for package management and respects the .nvmrc Node version specification
  • External dependencies are properly ignored in size calculations to focus on the actual library code
  • The action has write permissions to pull requests to post size comparison comments

https://claude.ai/code/session_01PSFXZZ7dMnxFc9ofxTDt4u

Measures gzipped (brotli) size of each published package's public API
surface using esbuild via size-limit. Workflow posts/updates a PR
comment via andresz1/size-limit-action. Entries point at TS sources
with peer deps marked as ignored so we measure what the library itself
contributes.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 22, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: fc6dd1c9-6faf-4c31-934a-1f850abf122e

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@nx-cloud
Copy link
Copy Markdown
Contributor

nx-cloud Bot commented May 22, 2026

View your CI Pipeline Execution ↗ for commit b647f5f

Command Status Duration Result
nx affected -t lint test build ✅ Succeeded 52s View ↗

☁️ Nx Cloud last updated this comment at 2026-05-22 12:49:59 UTC

@fwal fwal added this to the 1.0 - Effect v4 milestone May 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants