vendredi 31 juillet 2015

React IE8 works locally, not in production

We started introducing React to our large Django project to handle frontend complexity. So far, so good, but we ran into a problem.

React does not work in production on IE8. Locally it works fine on IE8. I've included es5-shim and es5-sham and I do see them in dev tools in production (included in the header, before React and code that's using React). But still, I get this error, like there's no shim:

SCRIPT438: Object doesn't support property or method 'isArray' 

I also got:

SCRIPT438: Object doesn't support property or method 'bind'

after which I included script mentioned in this post:

How to handle lack of JavaScript Object.bind() method in IE 8

However, after that I get:

SCRIPT5023: Function does not have a valid prototype object 

And I'm still getting the old errors. Again, locally it's working fine in IE8 so I'm guessing it's not the code itself that is the problem. Our app uses AWS CloudFront (but I do see the static .js files included in the html).

Any ideas what might be happening here?




Aucun commentaire:

Enregistrer un commentaire