Skip to content

Bundle-size budget enforcement in CI with size-limit and PR comments #47

Description

@PAMulligan

Summary

Lock in the README's "~150KB gzipped" claim with a hard CI gate. Surface size diffs as a PR comment so reviewers can see the impact of every dependency.

Motivation

Embeddable widgets live and die by bundle size. Without a budget, dependency creep is inevitable. A failing PR check is the cheapest way to keep the team honest.

Acceptance Criteria

  • size-limit configured with budgets for dist/claudius.iife.js, dist/index.mjs, and dist/claudius.css
  • Initial budgets set 5% above current size; CI fails on overage
  • size-limit/action posts a PR comment with size + gzip + brotli numbers
  • Budget changes require an explicit commit touching .size-limit.json (documented in CONTRIBUTING)
  • README badge linking to current bundle size

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendCloudflare Workers API and AI integrationenhancementNew feature or requestperformancePerformance improvementswidgetChat widget UI and embed functionality

    Type

    No type

    Projects

    Status
    Todo

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions