Measure the client bundle and lazy-load heavy dependencies where it helps

Aperta
#151 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
62/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
nextjs, typescript

Direzione di ricerca

Start with web/next.config.mjs and web/package.json to see how the build is configured, then trace how web/lib/contract.ts is imported by the pages. Add @next/bundle-analyzer behind an opt-in analyze script and record first-load sizes per route before changing anything. Done means the script is documented, before and after sizes are in the PR, and the build still passes with no behaviour change.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

difficulty: intermediate help wanted performance web

Difficulty: Intermediate

Problem

@stellar/stellar-sdk is large, and several pages import it through lib/contract.ts. Nobody has measured the route bundles, so it is unknown whether any route ships more JavaScript than it needs.

Why it matters

Users on mobile data in the target market pay for every kilobyte.

Scope of work

Add @next/bundle-analyzer behind an opt-in script, record the first-load size of each route, and lazy-load heavy code (dynamic imports) only where the measurement shows a clear win. Document the numbers.

Expected outcome

A documented baseline and, if justified, measurable reductions on affected routes.

Acceptance criteria

  • An analyze script exists and is documented.
  • Before and after sizes are in the PR.
  • No behaviour change, and the build passes. A "no change needed" conclusion with data is acceptable.

Relevant files

  • web/next.config.mjs, web/package.json, web/lib/contract.ts

Dependencies

None.

Maintainer discussion needed?

No.

Lingua principale
TypeScript
Stelle
0
Fork
4
Merge medio
54m
PR unite (30g)
6

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Yormee-103/PayLoop

Tutte le issue di Yormee-103/PayLoop

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.