Open edoTGTG opened 3 years ago
Im not sure where in the code there is a for-in. Can you please elaborate? Also where do you see that react 16 is included? If you see package.json react16||17 is a peer dependency so it is not included. IE11 is not really high priority to support but if it’s an simple fix im open for a PR.
node_modules/react-lottie-player/dist/LottiePlayerLight.js
Line 14
for (var key in source) {
Line 46 `/** @license React v16.13.1
Are you using create-react-app? If so, see here for how to add support for ie11: https://stackoverflow.com/questions/55967048/how-do-i-support-ie-11-with-create-react-app-3-0
As for why react is included in the dist, I'm looking into that.
Unfortunately not, we have an "old" app from 2 years ago, built the regular way. Lottie unfortunately is the only breaking our solution on IE11. Not even the latest react 17.0.2 does :/
Oh I see. But does normal lottie-web without react-lottie-player work in IE11?
Good question. I saw that they are supposedly supporting it, but opening lottiefiles.com on IE11 shows no animations and some errors.
If you can make lottie-web work on IE11, but reqct-lottie-player fails, then we can look into what’s causing it.
I setup a pen and tested it on IE11. It works flawlessly when using Lottie light from their CDN https://codepen.io/edotgtg/pen/BaZeONa
It'll throw a "SCRIPT1004: Expected ';' ". Very likely to be because of a FOR...IN loop https://stackoverflow.com/questions/55025430/script1004-expected-occuring-in-for-loop-ie-browser
Also, the Light package includes React 16... Why is that?
Thanks!