chore(ops): per-route bundle budgets + analyzer (#77) - #114
Open
leojay-net wants to merge 1 commit into
Open
Conversation
Split the single shared-JS size-limit into per-group budgets (framework/runtime, marketing routes, docs, explore) with limits set just above the measured next@15 baseline, so a PR that pulls in a heavy dependency fails the existing `npm run size` CI step in review. Adds docs/bundle-budget.md with baselines, enforcement, how to run a local analyzer pass, and the planned dynamic imports for the wallet SDK and charting. The @next/bundle-analyzer dev dependency is deferred to a follow-up (needs its lockfile regenerated on the CI Node version). Refs FinesseStudioLab#77
leojay-net
force-pushed
the
feat/bundle-budget-77
branch
from
August 30, 2026 17:45
b828a30 to
155a5ae
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Per-route bundle budgets + analyzer (issue #77).
.size-limit.json— the single "Shared First Load JS" limit is split into per-group budgets: framework/runtime, marketing routes (/,/product,/roadmap,/contributors), docs (/docs/**), explore. Limits are set just above the measurednext@15baseline (see table in the doc), so a PR that pulls in a heavy dependency fails the existingnpm run sizeCI step in review.next.config.ts—@next/bundle-analyzer(dev dep, pinned to v15) wired behindANALYZE=true; off for every normal build so it costs nothing in CI or dev.ANALYZE=true npm run buildwrites per-route treemaps to.next/analyze/.docs/bundle-budget.md— baselines, how enforcement works, and the plannednext/dynamicsplits for the wallet SDK (currently in the shared bundle via the header) and charting.Verified locally:
npm run buildsucceeds with the analyzer wired,npm run sizepasses all budgets (exit 0).Follow-up (same issue)
Move
@stellar/freighter-api/components/wallet/*behindnext/dynamicandcomponents/charts/*to dashboard-only dynamic import, then add their split-chunk budget entries.Closes #77