robbestad / react-iframe

Simple solution for using iframes in React
ISC License
434 stars 79 forks source link

Cannot Use in IE11 #30

Closed foxmicha closed 6 years ago

foxmicha commented 6 years ago

It appears that the exported index.js does not supported IE11 usage, primarily from the class declaration on line 5. Unfortunately, IE11 does not support ES6 classes: https://caniuse.com/#feat=es6-class

I've attempted replacing the index.js with code from the index.min.js and found that it works as intended. Would it be possible to change the deployed package to have an index.js that is the babelified / minified version and not the pure ES6 one?

robbestad commented 6 years ago

How did you import it? npm takes care of this for you (the entry point "main" points to index.min.js). The deployed package doesn't even carry the ES6-file (ignored with .npmignore). Furthermore, I use this package on my own site, which is 100% supported on IE11 (www.svenardo.com).

foxmicha commented 6 years ago

Quite right! It was in my implementation. Apparently I was pointed to my local github fork and not the NPM package. Must have forgot I was testing the onLoad PR #24 and didn't switch it back. Thanks for the heads up!