This workspace contains deterministic bundle-size fixtures for:
@tanstack/react-router@tanstack/solid-router@tanstack/vue-router@tanstack/react-start@tanstack/solid-start
Each package has minimal and full scenarios:
minimal: Small route app with__root+ index route that rendershello worldfull: Same route shape plus a broad root-level harness that imports/uses the full hooks/components surface- Start
fullscenarios also exercisecreateServerFn,createMiddleware, anduseServerFn
- Scenarios use file-based routing as the default app style.
- Router scenarios use
@tanstack/router-plugin/vitewithautoCodeSplitting: true. - Start Vite scenarios use
@tanstack/<framework>-start/plugin/vitewith router code-splitting enabled. - React Start also includes Rsbuild scenarios using
@tanstack/react-start/plugin/rsbuild. - Full-surface coverage is manually maintained (no strict export-coverage gate).
- Primary metrics measure all emitted client JS chunks and are reported as raw/gzip/brotli bytes.
- Initial-load JS graph metrics are also recorded as
initialRawBytes,initialGzipBytes, andinitialBrotliBytesfor context. - Gzip for all emitted client JS is the primary tracking signal for PR deltas and historical charting.
pnpm nx run @benchmarks/bundle-size:buildThis writes:
benchmarks/bundle-size/results/current.jsonbenchmarks/bundle-size/results/benchmark-action.json
- PR workflow generates a sticky comment with:
- current gzip values
- baseline delta
- inline sparkline trend
- Pushes to
mainpublish historical chart data to GitHub Pages viabenchmark-action/github-action-benchmark.
When router/start public hooks/components evolve, update the corresponding *-full/src/routes/__root.tsx harness to keep full scenarios representative.
The measurement script supports optional interfaces for historical backfilling:
--sha--measured-at--append-history
These are intended for one-off scripts that replay historical commits and append results to the same history dataset shape used for chart generation.
If --append-history points at a data.js file, output is written as window.BENCHMARK_DATA = ... for direct GitHub Pages compatibility.