Skip to content

ops: bundle size budget and analysis #77

Description

@joelpeace48-cell

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

  • Analyzer wired up with per-route baselines
  • Budgets enforced in CI
  • Wallet and charting dynamically imported
  • Marketing routes ship minimal client JavaScript

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.

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSThird CampaignCampaign: Third Campaignarea:opsSEO, analytics, CIdifficulty:mediumFamiliar patterns; touches a few files or conceptspriority:mediumValuable, not blockingtype:choreTooling, CI, dependencies

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions