Consider shipping fewer bundles

Đang mở
#361 2 bình luận 5 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ó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Tái cấu trúc
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
javascript
Lĩnh vực
build-system, release

Hướng nghiên cứu

Start with package.json lines 39-71 and inspect which sources, bundles, and source maps are included in the published npm package. Compare the ESM and CommonJS outputs, then decide which artifacts can be removed while preserving the supported package formats. Done means a smaller published package with faster installs and no unnecessary duplicate bundles or source maps.

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

Mô tả

https://github.com/foliojs/fontkit/blob/fbf3b9ef21eebd219eb73e666faed573af0fba09/package.json#L39-L71

Currently the following is in the published npm package:

  • sources
  • ES module bundle
  • browser bundle
  • CommonJS bundle
  • browser CommonJS bundle

On top of this source maps exist for each bundle.

maybe im missing something, but it seems we're now at the point where these are equivalent:

  • ES module / browser
  • CommonJS / browser CommonJS

The sources probably don't need to be published, and the sourcemaps are likely unused too (who is debugging fontkit in their node modules?).

Can we greatly simplify this to where we either ship ESM-only, or at least only the ESM/CJS bundles and no sourcemaps?

The gain here would be faster installs, and smaller install size.

Ngôn ngữ chính
JavaScript
Star
1.7k
Fork
254
Merge trung bình
1 ngày 14 giờ
Pull request đã merge (30 ngày)
19

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

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

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 foliojs/fontkit

Tất cả issue của foliojs/fontkit

Issue tương tự

Thêm issue về JavaScript

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.