danawoodman / react-fontawesome

A React Font Awesome component.
https://www.npmjs.com/package/react-fontawesome
MIT License
667 stars 72 forks source link

on 1.0+, the npm builds do not always quote 'default' as a key which causes errors on IE8 #17

Closed kurttheviking closed 8 years ago

kurttheviking commented 8 years ago

In the build, compare this line:

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

to this line:

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

The second example is from line 9 of the 0.3.3 release and works as expected.

danawoodman commented 8 years ago

Interesting. Thanks for the submission @kurttheviking. Not sure what I can do considering the build is generated by Babel. Any thoughts?

kurttheviking commented 8 years ago

@danawoodman As it turns out, we've found a couple other problems with how Babel deal with "legacy" browsers similar to this. For the time being we are vendoring react-fontawesome and applying local modifications (rather than an npm-installable dependency). I don't yet have a common way to apply a Babel transform that fixes these problems yet though; perhaps more on that later...

danawoodman commented 8 years ago

Thanks @kurttheviking let me know if you figure out anything more