react-modal-sheet icon indicating copy to clipboard operation
react-modal-sheet copied to clipboard

framer-motion is not tree-shaking

Open kestevez-rv opened this issue 2 years ago • 3 comments

Could you please make use of framer-motion in such a way to provide tree-shake to reduce the bundle size?

kestevez-rv avatar Sep 30 '23 03:09 kestevez-rv

Hi @kestevez-rv 👋🏻

How could that be done? This library is using quite a lot of framer-motion features and based on the docs I would have to include the domMax feature set which wouldn't give any reduction in bundle size, right?

Temzasse avatar Oct 07 '23 11:10 Temzasse

@Temzasse From my understanding you will have to load domMax but it will be loaded async so the initial bundle size will be smaller (As far as I understood it), but then it will load the rest in a different chunk.

omridevk avatar Jun 06 '24 17:06 omridevk

Unfortunately the 100kb framer-motion adds is a real deal breaker for us, great lib nonetheless

omridevk avatar Jun 06 '24 17:06 omridevk