{"action":"created","issue":{"url":"https://api.github.com/repos/reactjs/redux/issues/1369","repository_url":"https://api.github.com/repos/reactjs/redux","labels_url":"https://api.github.com/repos/reactjs/redux/issues/1369/labels{/name}","comments_url":"https://api.github.com/repos/reactjs/redux/issues/1369/comments","events_url":"https://api.github.com/repos/reactjs/redux/issues/1369/events","html_url":"https://github.com/reactjs/redux/pull/1369","id":131751063,"number":1369,"title":"Add ES Modules build","user":{"login":"gaearon","id":810438,"avatar_url":"https://avatars.githubusercontent.com/u/810438?v=3","gravatar_id":"","url":"https://api.github.com/users/gaearon","html_url":"https://github.com/gaearon","followers_url":"https://api.github.com/users/gaearon/followers","following_url":"https://api.github.com/users/gaearon/following{/other_user}","gists_url":"https://api.github.com/users/gaearon/gists{/gist_id}","starred_url":"https://api.github.com/users/gaearon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gaearon/subscriptions","organizations_url":"https://api.github.com/users/gaearon/orgs","repos_url":"https://api.github.com/users/gaearon/repos","events_url":"https://api.github.com/users/gaearon/events{/privacy}","received_events_url":"https://api.github.com/users/gaearon/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":43,"created_at":"2016-02-05T20:46:47Z","updated_at":"2016-04-16T19:50:23Z","closed_at":"2016-02-05T22:01:53Z","pull_request":{"url":"https://api.github.com/repos/reactjs/redux/pulls/1369","html_url":"https://github.com/reactjs/redux/pull/1369","diff_url":"https://github.com/reactjs/redux/pull/1369.diff","patch_url":"https://github.com/reactjs/redux/pull/1369.patch"},"body":"Addresses #1042, #1327.\r\n\r\nThis is intended to fix the Rollup issues by fixing `jsnext:main` to point to the special build in the `es-modules` folder. That build is identical to the CommonJS build *except* that it doesn’t include the `transform-es2015-modules-commonjs` Babel plugin.\r\n\r\nHowever we have a problem here. We started using Lodash 4.x recently. Lodash modules are CommonJS builds and offer no ES6 equivalents. Therefore, even with this PR, if you try to [use Redux in a Rollup project with `npm({ jsnext: true })`](https://github.com/gaearon/rollup-starter-project/pull/1), you will see the following error:\r\n\r\n```\r\n> rollup-starter-project@1.0.0 build /Users/gaearon/p/rollup-starter-project\r\n> rollup -c rollup.config.umd.js && rollup -c rollup.config.es6.js\r\n\r\nModule redux/node_modules/lodash/isPlainObject.js does not export default (imported by redux/es-modules/combineReducers.js)\r\n```\r\n\r\nThis would be a non-issue if Lodash offered an ES modules build of its modules. For example, `lodash/es-modules/isPlainObject` that would be identical to `lodash/isPlainObject` but used ES Modules `import` and `export` instead of CommonJS.\r\n\r\nAnother possible fix is to give up on offering ES modules with Babel build, and instead build a separate ES6 single file bundle using either Webpack or Rollup itself.\r\n\r\nI welcome comments and discussion around this because I really want to fix things for Rollup users on our end.\r\n\r\ncc @Rich-Harris @dchambers @taion @flying-sheep"},"comment":{"url":"https://api.github.com/repos/reactjs/redux/issues/comments/210882879","html_url":"https://github.com/reactjs/redux/pull/1369#issuecomment-210882879","issue_url":"https://api.github.com/repos/reactjs/redux/issues/1369","id":210882879,"user":{"login":"taion","id":3112159,"avatar_url":"https://avatars.githubusercontent.com/u/3112159?v=3","gravatar_id":"","url":"https://api.github.com/users/taion","html_url":"https://github.com/taion","followers_url":"https://api.github.com/users/taion/followers","following_url":"https://api.github.com/users/taion/following{/other_user}","gists_url":"https://api.github.com/users/taion/gists{/gist_id}","starred_url":"https://api.github.com/users/taion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taion/subscriptions","organizations_url":"https://api.github.com/users/taion/orgs","repos_url":"https://api.github.com/users/taion/repos","events_url":"https://api.github.com/users/taion/events{/privacy}","received_events_url":"https://api.github.com/users/taion/received_events","type":"User","site_admin":false},"created_at":"2016-04-16T19:50:23Z","updated_at":"2016-04-16T19:50:23Z","body":"Sorry, I don't mean that this is an issue in Rollup – the way you described the semantics of the spec make sense (though they're clearly not optimal for the \"re-export a bunch of stuff in entry point\" use case).\r\n\r\nI mean that I wish there were something like a\r\n\r\n```js\r\nexport foo from './foo' as passthrough\r\n```\r\n\r\nor whatever that would be specifically geared for this style of re-exports, which that importing `bar` from there would not touch any `foo`."}}