Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It completely breaks App in IE11 (using Light) #49

Open
edoTGTG opened this issue Sep 28, 2021 · 8 comments
Open

It completely breaks App in IE11 (using Light) #49

edoTGTG opened this issue Sep 28, 2021 · 8 comments

Comments

@edoTGTG
Copy link

edoTGTG commented Sep 28, 2021

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!

@mifi
Copy link
Owner

mifi commented Sep 28, 2021

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.

@edoTGTG
Copy link
Author

edoTGTG commented Sep 28, 2021

node_modules/react-lottie-player/dist/LottiePlayerLight.js

Line 14
for (var key in source) {

Line 46
`/** @license React v16.13.1

@mifi
Copy link
Owner

mifi commented Sep 30, 2021

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.

mifi added a commit that referenced this issue Sep 30, 2021
@mifi mifi mentioned this issue Sep 30, 2021
@edoTGTG
Copy link
Author

edoTGTG commented Oct 1, 2021

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 :/

@mifi
Copy link
Owner

mifi commented Oct 1, 2021

Oh I see. But does normal lottie-web without react-lottie-player work in IE11?

@edoTGTG
Copy link
Author

edoTGTG commented Oct 1, 2021

Good question. I saw that they are supposedly supporting it, but opening lottiefiles.com on IE11 shows no animations and some errors.

@mifi
Copy link
Owner

mifi commented Oct 3, 2021

If you can make lottie-web work on IE11, but reqct-lottie-player fails, then we can look into what’s causing it.

@edoTGTG
Copy link
Author

edoTGTG commented Oct 4, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants