Problem
The current build ships about 103 kB of shared JavaScript for what is
essentially a static marketing site. That is acceptable now, but the wallet
integration, charting, and dashboard are all heavy additions, and without a
budget the growth will be invisible until the site is slow.
What to do
- Add
@next/bundle-analyzer and record a baseline per route.
- Set a budget per route and fail CI when a pull request exceeds it — the
moment to catch a heavy dependency is in review, not after release.
- Dynamically import the genuinely heavy pieces: wallet SDK only on routes that
connect, charting only on the dashboard.
- Keep marketing routes as Server Components with minimal client JavaScript;
they are what most visitors see and they need almost none.
- Track the budget alongside Core Web Vitals so the number connects to a real
user outcome.
Acceptance criteria
Notes
Wallet SDKs are usually the largest single dependency in a project like this.
Load it on demand from the start rather than retrofitting the split later.
Problem
The current build ships about 103 kB of shared JavaScript for what is
essentially a static marketing site. That is acceptable now, but the wallet
integration, charting, and dashboard are all heavy additions, and without a
budget the growth will be invisible until the site is slow.
What to do
@next/bundle-analyzerand record a baseline per route.moment to catch a heavy dependency is in review, not after release.
connect, charting only on the dashboard.
they are what most visitors see and they need almost none.
user outcome.
Acceptance criteria
Notes
Wallet SDKs are usually the largest single dependency in a project like this.
Load it on demand from the start rather than retrofitting the split later.