Skip to content

ci(ci): add bundle size reporting workflow#511

Merged
mihar-22 merged 5 commits intomainfrom
ci/bundle-size-reporting
Feb 12, 2026
Merged

ci(ci): add bundle size reporting workflow#511
mihar-22 merged 5 commits intomainfrom
ci/bundle-size-reporting

Conversation

@mihar-22
Copy link
Copy Markdown
Member

Summary

Add automated bundle size reporting to PRs using size-limit + size-limit-action. Measures tree-shaken, minified, brotli-compressed sizes for all main package entry points — informational only, no hard budgets yet.

Changes

  • Add size-limit (v12) with @size-limit/preset-small-lib (esbuild + file plugins)
  • Track 7 entries across 4 packages: store, store/lit, store/react, core, core/dom, react, html
  • Measures production builds (dist/default/) with __DEV__ stripped
  • New bundle-size.yml workflow triggers on PRs to main, posts comparison comment
  • pnpm size available locally to check current sizes
Current baseline sizes
Entry Size (brotli)
@videojs/store 1.34 kB
@videojs/store/lit 1.05 kB
@videojs/store/react 3.14 kB
@videojs/core 1.35 kB
@videojs/core/dom 2.60 kB
@videojs/react 9.02 kB
@videojs/html 8.73 kB

Testing

  • pnpm size runs locally and produces correct output
  • pnpm size-limit --json produces valid JSON for the CI action
  • Workflow will be validated on this PR itself

Add size-limit with esbuild preset to measure tree-shaken, minified,
brotli-compressed sizes for store, core, react, and html packages.
Reports are posted as PR comments via size-limit-action.
@vercel
Copy link
Copy Markdown

vercel bot commented Feb 12, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
vjs-10-demo-react Ignored Ignored Preview Feb 12, 2026 10:38am

Request Review

@netlify
Copy link
Copy Markdown

netlify bot commented Feb 12, 2026

Deploy Preview for vjs10-site ready!

Name Link
🔨 Latest commit 970e54b
🔍 Latest deploy log https://app.netlify.com/projects/vjs10-site/deploys/698dad9e8fcc6000087adc44
😎 Deploy Preview https://deploy-preview-511--vjs10-site.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Drop andresz1/size-limit-action in favor of a custom workflow that
calls size-limit directly. Handles pnpm workspaces, bootstrap (no
baseline on main), and generates a markdown table posted as a PR
comment with delta tracking and status icons.
Passing markdown through step outputs broke JS parsing due to
backticks and special characters in the interpolated string.
@github-actions
Copy link
Copy Markdown
Contributor

📦 Bundle Size Report

Package Base PR Delta
@videojs/store 1.31 kB 🆕
@videojs/store/lit 1.03 kB 🆕
@videojs/store/react 3.07 kB 🆕
@videojs/core 1.32 kB 🆕
@videojs/core/dom 2.54 kB 🆕
@videojs/react 8.81 kB 🆕
@videojs/html 8.53 kB 🆕
Total 26.61 kB
ℹ️ How to interpret

Sizes are minified + brotli compressed, measured via size-limit with esbuild tree-shaking.

Icon Meaning
No change
🔺 Size increased ≤ 10%
🔴 Size increased > 10%
🔽 Size decreased
🆕 New entry (no baseline)

Run pnpm size locally to check current sizes.

@mihar-22 mihar-22 merged commit 98ee4e8 into main Feb 12, 2026
8 of 9 checks passed
@mihar-22 mihar-22 deleted the ci/bundle-size-reporting branch February 12, 2026 10:39
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.

1 participant