Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Add a bundle size budget for the widget to CI

Đã đóng Phù hợp với người mới
#176 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ó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
82/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
github-actions, typescript
Lĩnh vực
build-system, ci-cd, tooling

Hướng nghiên cứu

Bắt đầu với package.json ở thư mục gốc và các dòng 35–42 trong .github/workflows/ci.yml; CONTRIBUTING.md mô tả cách thiết lập pnpm và thứ tự build. Thêm size-limit cùng @size-limit/file, cấu hình ngân sách gzip cho packages/widget/dist/chatcops.min.js và packages/widget/dist/chatcops.esm.js, thêm script size ở thư mục gốc và chạy script này trong CI sau khi build. Hoàn tất khi pnpm size báo cáo cả hai tệp, CI kiểm tra IIFE theo giới hạn 14 KB gzip và CONTRIBUTING.md đề cập đến ngân sách.

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

Mô tả

enhancement good first issue hacktoberfest testing widget

The widget is about 12 KB gzipped today (packages/widget/dist/chatcops.min.js after pnpm -r build), but nothing stops it from growing. CI only builds, typechecks and tests (.github/workflows/ci.yml, lines 35 to 42).

What to do

  • Add size-limit with @size-limit/file as a root dev dependency.
  • Add a .size-limit.json with a 14 KB gzip limit for packages/widget/dist/chatcops.min.js and a separate entry for packages/widget/dist/chatcops.esm.js.
  • Add a size script to the root package.json and a CI step after the build that runs it.
  • No PR comment bot for now. A failing step is enough.

Acceptance criteria

  • pnpm size prints both files with their gzip size and passes on dev
  • CI fails when the IIFE goes over 14 KB gzip (show it by temporarily lowering the limit in your PR description, not in the committed config)
  • CONTRIBUTING.md mentions the budget in one line
  • No changeset needed (tooling only)

Want to work on this? Comment below and I'll assign it to you. Please take one issue at a time, branch off dev, and open your PR against dev with Closes #<this issue number>. Setup notes (pnpm, build before test) are in CONTRIBUTING.md.

Ngôn ngữ chính
TypeScript
Star
13
Fork
7
Merge trung bình
3 giờ 28 phút
Pull request đã merge (30 ngày)
182

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 codercops/chatcops

Tất cả issue của codercops/chatcops

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.