ci: Report Next.js/RSC and renderToPipeableStream bundle sizes - #4093
Conversation
Keep the existing SPA rdcClient gzip check and add matching production webpack measurements for @data-client/react/nextjs and @data-client/react/ssr. Co-authored-by: Nathaniel Tucker <me@ntucker.me>
|
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
|
Size Change: +22 kB (+27.11%) 🚨 Total Size: 103 kB 📦 View Changed
ℹ️ View Unchanged
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4093 +/- ##
=======================================
Coverage 97.84% 97.84%
=======================================
Files 156 156
Lines 3057 3057
Branches 612 612
=======================================
Hits 2991 2991
Misses 18 18
Partials 48 48 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Drop the workflow comments and extra gitignore. Build adapters into yarn's cache dir and copy only the rdc chunks into dist/. Co-authored-by: Nathaniel Tucker <me@ntucker.me>
ntucker
left a comment
There was a problem hiding this comment.
Wire the SPA entry through ./ui too.
ui.tsx extracts Doit for the adapter entries, but index.tsx still inlines the same component. That leaves two sources of truth for the fixture that keeps the three package graphs comparable — the next edit to one side will silently skew SPA vs nextjs/ssr.
Please import Doit from ./ui in index.tsx and drop the inlined copy. Leave the existing React.memo / second / renderedElement SPA entry shape alone (nothing else imports those exports; renderedElement is still used locally, and touching them only risks App.js noise in the size comment).
Rest looks good: isolated webpack compiles + cache-dir copy of only rdc* into dist/ is the right shape for per-adapter gzip without double-counting App/react; rdcClient staying flat and the +22 kB new-file comment are expected first-measure noise.
Import Doit from ./ui in index.tsx so SPA, Next.js/RSC, and renderToPipeableStream keep one fixture source of truth. Co-authored-by: Nathaniel Tucker <me@ntucker.me>
|
Staff CHANGE_THIS_PR cleared by sharing |
Fixes # .
Motivation
The Bundle Size check only gzip-measured the SPA
@data-client/reactgraph (rdcClient.js). Next.js App Router / RSC (@data-client/react/nextjs) and genericrenderToPipeableStream(@data-client/react/ssr) adapter graphs were untracked, so streaming work on those export paths could land without a size comment.Solution
Same
preactjs/compressed-size-action@v2job, sameyarn ci:build:bundlesize/ production minify, same gzip PR comment.examples/test-bundlesizeruns three isolated webpack compilations (SPA plus two adapters) and copies only the adapterrdc*chunks intodist/so the existing glob picks them up:rdcClient.js— SPA (@data-client/react) — unchanged vs master (0 byte gzip delta)rdcNextjs.js— Next.js/RSC (@data-client/react/nextjs)rdcPipeableStream.js— renderToPipeableStream (@data-client/react/ssr)Local dry-run (
zlib.gzipSync, same compression as the action):rdcClient.jsrdcNextjs.jsrdcPipeableStream.jsMaster already ships
./nextjsand./ssr, so this measures what master publishes today. Future streaming on those export paths will show up as deltas on the same two files.Open questions
N/A