andywer / andywer/isomorphic-crypto

Reduce size for browser

Đang mở
#1 3 bình luận 1 reaction 0 người được giao Xem trên GitHub
enhancement
Ngôn ngữ chính
JavaScript
Star
12
Fork
0
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

1. You should use [Size Limit](https://github.com/ai/size-limit). In this case it will show that browser version will be about 100 KB. In real usage, webpack will find `require('crypto')` and will insert own polyfill even if you already have different `crypto-browserify` polyfill.
2. `if (process.browser)` is a bad way to detect browsers. It inserts 1 KB polyfill. Better to use `"browser"` key in `package.json`. Here is example from `nanoid`: https://github.com/ai/nanoid/blob/116c48d1a2f46ca80f87cd560de9fdc75c454b4c/package.json#L14-L16

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

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.