Company
Date Published
Author
Francesco Novy
Word count
1580
Language
English
Hacker News points
None

Summary

The Sentry JavaScript SDK has made significant efforts to reduce its bundle size by up to 35% through various optimization techniques. The company updated the underlying rrweb package from version 1 to version 2, which brought improvements but also increased the bundle size. To mitigate this, they implemented several strategies, including making build-time flags for tree shaking more accessible, removing unused code and features, such as canvas recording support by default, and updating the compression library to a smaller footprint. Additionally, they made it possible for users to host their own compression worker, reducing the bundled size by 10KB. These efforts resulted in a notable reduction in bundle size while maintaining functionality.