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

Use of dot notation 'default' breaks IE8 #232

Closed
kevana opened this issue Dec 28, 2015 · 8 comments · Fixed by #233
Closed

Use of dot notation 'default' breaks IE8 #232

kevana opened this issue Dec 28, 2015 · 8 comments · Fixed by #233

Comments

@kevana
Copy link

kevana commented Dec 28, 2015

Looks like this happened in the 4.0.1 release, might be related to the Babel 6 upgrade but I'm not positive.

dist/react-redux.js:

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

    exports.Provider = _Provider2.default;
    exports.connect = _connect2.default;
@kevana
Copy link
Author

kevana commented Dec 28, 2015

I think adding es3 transforms (es3-member-expression-literals, es3-property-literals) to the babel config will fix it, I'll check tonight.

@gaearon
Copy link
Contributor

gaearon commented Dec 28, 2015

I'm on it

@kevana
Copy link
Author

kevana commented Dec 28, 2015

Thanks 👍

@gaearon
Copy link
Contributor

gaearon commented Dec 28, 2015

Unfortunately those transforms aren't currently helpful because of a bug: https://phabricator.babeljs.io/T2817. I'll have to go back to using CommonJS internally until this is fixed.

@kevana
Copy link
Author

kevana commented Dec 28, 2015

Ok, it's not a high priority issue for me, the webpack workaround isn't too bad:

// webpack config for string-replace-webpack-plugin
{
  pattern: /\.default(?=[^\w$])/g,
  replacement: function () {
    return "['default']"
  }
},
{
  pattern: /\{\sdefault:/g,
  replacement: function () {
    return "{ 'default':"
  }
}

@gaearon
Copy link
Contributor

gaearon commented Dec 28, 2015

It's still a breaking change we need to fix though. Which is not fun. :-( I think we'll go with requiring ES5 environment in the next version, and will ask people to es3ify or equivalent if they need IE8.

@gaearon
Copy link
Contributor

gaearon commented Dec 28, 2015

Please verify whether this is fixed in 4.0.6.

@kevana
Copy link
Author

kevana commented Dec 29, 2015

Verified fixed, thanks.

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

Successfully merging a pull request may close this issue.

2 participants