From d7afa62f364822f6934feea66aee3976add8a52f Mon Sep 17 00:00:00 2001 From: Ivo Date: Sun, 4 Oct 2026 17:56:35 +0200 Subject: [PATCH 01/61] chore(ci): raise the bundle size budget to 78KB Normalizing CSS values for the exporters and escaping previewText add about 1.8KB to the unminified ESM bundle. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/test.yml | 9 +++++---- CLAUDE.md | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6aa622e..87e3f10 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -55,16 +55,17 @@ jobs: run: pnpm --filter @unlayer/react-elements typecheck # ── Bundle size budget ────────────────────────────────────── - # Fail if the react-elements ESM bundle exceeds 76KB. - # Current size: ~76KB (15 components + image width-pinning geometry - # + per-mode full-document shells for renderToHtml). + # Fail if the react-elements ESM bundle exceeds 78KB. + # Current size: ~77.7KB (15 components + image width-pinning geometry + # + per-mode full-document shells for renderToHtml + CSS value + # normalization for the exporters and escaped previewText). # The budget tracks the unminified ESM output as a proxy for code volume; # it still flags accidental dependency bundling (any real dep is 10KB+). - name: Check bundle size run: | BUNDLE="packages/react/dist/index.js" SIZE=$(wc -c < "$BUNDLE" | tr -d ' ') - MAX_SIZE=76000 + MAX_SIZE=78000 echo "Bundle: $BUNDLE" echo "Size: $SIZE bytes (budget: $MAX_SIZE bytes)" if [ "$SIZE" -gt "$MAX_SIZE" ]; then diff --git a/CLAUDE.md b/CLAUDE.md index c493fc9..933a8c6 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -108,7 +108,7 @@ Example: `