jaredLunde / masonic

🧱 High-performance masonry layouts for React
https://codesandbox.io/s/0oyxozv75v
MIT License
797 stars 49 forks source link

ResizeObserver polyfill should be provided through a prop instead of included in the bundle #151

Closed aalpgiray closed 6 months ago

aalpgiray commented 11 months ago

Hey!

We noticed "@juggle/resize-observer": "^3.3.1", package is in dependencies. But depending of the target browsers that might not be needed. Can we remove this from the bundle and add this as optional peer dependency or to the documents. This will reduce the bundle size. Here is the analysis. image

jaredLunde commented 8 months ago

All things considered the bundle size is not a big problem. However, I agree that in this day and age it'd be nice to have a ResizeObserver polyfill be provided as a prop rather than included in the bundle.

jaredLunde commented 8 months ago

I would accept a PR for this btw