utsuboco / r3f-perf

Easily monitor your ThreeJS performances.
https://codesandbox.io/s/perlin-cubes-r3f-perf-wtp9t?file=/src/App.js
MIT License
573 stars 21 forks source link

Excessive bundle size #26

Closed gregdingle closed 2 years ago

gregdingle commented 2 years ago

Hi, we love your tool. However, it depends on react-icons which adds >6mb to our bundle size. We had to lazy load <Perf> as a result. Maybe that's something you should write about in the docs?

gregdingle commented 2 years ago

Nevermind, bundlephobia shows only a few K.

gregdingle commented 2 years ago

I found the problem is due to tree shaking failing for react-icons. The fallback solution is to use react-icons/all-files... or maybe just install the icon libs needed within the catch-all react-icons.

gregdingle commented 2 years ago

See https://bundlephobia.com/package/@react-icons/all-files@4.1.0

RenaudRohlinger commented 2 years ago

Hello!

Fixed in 5.2.0. I'm now using radix icons. See: https://twitter.com/onirenaud/status/1495407672581300225