GoogleCloudPlatform / GoogleCloudPlatform/stackdriver-errors-js

Reduce the bundle size

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

Mô tả

Currently requiring `stackdriver-errors-js` results in quite a lot of code being pulled in -- it's one of our largest dependencies.

Screenshot 2021-02-26 at 18 55 52

The above is generated using https://github.com/webpack-contrib/webpack-bundle-analyzer.

Stat Size: 136.64KB (before minification)
Parsed Size: 39.06 KB (after minification)
**Gzipped: 11.65KB (after minification + gzip)**

Although it's not strictly because of code in `stackdriver-errors-js`, I figured this is a good place to start to get an understanding of what really is required to report errors to stackdriver.

In particular I'd love to find out how important `stacktrace-js` is to this libraries functionality and whether there are opportunities to cut it or use an alternative dependency -- I wonder if it's supporting very old browsers / edge cases which are no longer relevant to everybody 🤔

I'm tempted to just try to write a simple stackdriver API wrapper without `stacktrace-js` but of course there's every chance I'll end up going through the exact same process this library went through and realise it's not possible without those large dependencies so any advice is welcome!

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

Mở hướng dẫn đóng góp

Đá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.