Gamote / lottie-react

A lightweight React library for rendering complex After Effects animations in real time using Lottie.
https://lottiereact.com
Other
794 stars 58 forks source link

Issue #33, decrease bundle size by using lottie light #86

Open summerliu opened 1 year ago

summerliu commented 1 year ago

My team ran into this issue #33 as well. The lottie bundle size was initially 3.81MB.(see image below) lottie-react

And after implemented it with lottie light, it did reduced to 2.86MB.(also see image below) lottie-react-light

This implementation could refer to https://github.com/dilan-dio4/lottie-light-react/commit/28c5bcbadcbc2b06dc92e0d2d1be1e20c64d5c1d#diff-0b5adbfe7b36e4ae2f479291e20152e33e940f7f265162d77f40f6bdb5da7405 by @dilan-dio4

Let me know if there is any question. Thanks!

jorisw commented 9 months ago

@Gamote Would you mind looking into this year old PR?

It would also remove this security concern:

Use of eval in "../../node_modules/lottie-web/build/player/lottie.js" is strongly discouraged as it poses security risks and may cause issues with minification.
elix1er commented 5 months ago

bump