CodeForPhilly / CodeForPhilly/codeforphilly-ng

Code-split the apps/web bundle

Aperta
#31 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
TypeScript
Stelle
1
Fork
1
Merge medio
5g 3h
PR unite (30g)
9

Descrizione

**Context:** PR #28 ships every public screen statically imported by `App.tsx`. The production bundle is 550 kB (164 kB gzipped), which vite warns about at build time.

The cheapest fix is `React.lazy()` on each screen so each route splits naturally. The shell + home are the hot path; everything else can lazy-load.

**Acceptance:**

- [ ] No single chunk > 200 kB gzipped
- [ ] First-paint route (`/`) loads only the hero + shell-needed code
- [ ] Smoke tests still pass (lazy + Suspense boundary doesn't break the render harness)

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.