reduxjs/react-redux

use of Object.defineProperty breaks ie8 again

xcatliu opened this issue · 3 comments

At #133, we fixed the issue within v3.1.0.

But it appears again in v4.0.3.

Here is the file lib/index.js in v3.1.0 and v4.0.3.

v3.1.0

'use strict';

exports.__esModule = true;

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

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

var _componentsCreateAll = require('./components/createAll');

var _componentsCreateAll2 = _interopRequireDefault(_componentsCreateAll);

var _createAll = _componentsCreateAll2['default'](_react2['default']);

var Provider = _createAll.Provider;
var connect = _createAll.connect;
exports.Provider = Provider;
exports.connect = connect;

v4.0.3

'use strict';

exports.__esModule = true;

var _Provider = require('./components/Provider');

Object.defineProperty(exports, 'Provider', {
  enumerable: true,
  get: function get() {
    return _Provider.default;
  }
});

var _connect = require('./components/connect');

Object.defineProperty(exports, 'connect', {
  enumerable: true,
  get: function get() {
    return _connect.default;
  }
});

It seems to be a problem with babel@6.

What .babelrc should we set to avoid the use of defineProperty?

Sorry for screwing this up. Should be fixed in 4.0.4.

@gaearon Thanks! Works fine with v4.0.4.