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

Đang mở
#151 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
62/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
nextjs, typescript
Lĩnh vực
build-system, frontend

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
TypeScript
Star
0
Fork
4
Merge trung bình
54 phút
Pull request đã merge (30 ngày)
6

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Yormee-103/PayLoop

Tất cả issue của Yormee-103/PayLoop

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.