airbnb / lottie-web

Render After Effects animations natively on Web, Android and iOS, and React Native. http://airbnb.io/lottie/
MIT License
29.85k stars 2.85k forks source link

5.12.1 import chunk #2992

Closed h615861768 closed 1 year ago

h615861768 commented 1 year ago

Latest version of lottie (5.12.1) breaks imports

5.12.0 worked fine 5.12.1 results in:

error msg: lottie.loadAnimation is not a function.

i use import('lottie-web').then(lottie => { lottie.loadAnimation(...)}) can works on 5.12.0

in 5.12.1 import('lottie-web').then(lottie => { console.log(lottie)};

console.log lottie root is only default, need use lottie.default.loadAnimation

bodymovin commented 1 year ago

I just published version 5.12.2 that should fix this. Can you let me know if it fixes it?

h615861768 commented 1 year ago

i try it in local, 5.12.2 is fixed 👍🏻