{"action":"created","issue":{"url":"https://api.github.com/repos/apollographql/react-apollo/issues/2661","repository_url":"https://api.github.com/repos/apollographql/react-apollo","labels_url":"https://api.github.com/repos/apollographql/react-apollo/issues/2661/labels{/name}","comments_url":"https://api.github.com/repos/apollographql/react-apollo/issues/2661/comments","events_url":"https://api.github.com/repos/apollographql/react-apollo/issues/2661/events","html_url":"https://github.com/apollographql/react-apollo/pull/2661","id":390872288,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM4NTQxOTY5","number":2661,"title":"[WIP] Reduce bundle size.","user":{"login":"benjamn","id":5750,"node_id":"MDQ6VXNlcjU3NTA=","avatar_url":"https://avatars0.githubusercontent.com/u/5750?v=4","gravatar_id":"","url":"https://api.github.com/users/benjamn","html_url":"https://github.com/benjamn","followers_url":"https://api.github.com/users/benjamn/followers","following_url":"https://api.github.com/users/benjamn/following{/other_user}","gists_url":"https://api.github.com/users/benjamn/gists{/gist_id}","starred_url":"https://api.github.com/users/benjamn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benjamn/subscriptions","organizations_url":"https://api.github.com/users/benjamn/orgs","repos_url":"https://api.github.com/users/benjamn/repos","events_url":"https://api.github.com/users/benjamn/events{/privacy}","received_events_url":"https://api.github.com/users/benjamn/received_events","type":"User","site_admin":false},"labels":[{"id":642508259,"node_id":"MDU6TGFiZWw2NDI1MDgyNTk=","url":"https://api.github.com/repos/apollographql/react-apollo/labels/PR:%20encouraged","name":"PR: encouraged","color":"0e8a16","default":false},{"id":642508157,"node_id":"MDU6TGFiZWw2NDI1MDgxNTc=","url":"https://api.github.com/repos/apollographql/react-apollo/labels/help-wanted","name":"help-wanted","color":"159818","default":false},{"id":642508212,"node_id":"MDU6TGFiZWw2NDI1MDgyMTI=","url":"https://api.github.com/repos/apollographql/react-apollo/labels/in-progress","name":"in-progress","color":"ededed","default":false},{"id":642508186,"node_id":"MDU6TGFiZWw2NDI1MDgxODY=","url":"https://api.github.com/repos/apollographql/react-apollo/labels/refactor","name":"refactor","color":"bfdadc","default":false}],"state":"open","locked":false,"assignee":{"login":"benjamn","id":5750,"node_id":"MDQ6VXNlcjU3NTA=","avatar_url":"https://avatars0.githubusercontent.com/u/5750?v=4","gravatar_id":"","url":"https://api.github.com/users/benjamn","html_url":"https://github.com/benjamn","followers_url":"https://api.github.com/users/benjamn/followers","following_url":"https://api.github.com/users/benjamn/following{/other_user}","gists_url":"https://api.github.com/users/benjamn/gists{/gist_id}","starred_url":"https://api.github.com/users/benjamn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benjamn/subscriptions","organizations_url":"https://api.github.com/users/benjamn/orgs","repos_url":"https://api.github.com/users/benjamn/repos","events_url":"https://api.github.com/users/benjamn/events{/privacy}","received_events_url":"https://api.github.com/users/benjamn/received_events","type":"User","site_admin":false},"assignees":[{"login":"benjamn","id":5750,"node_id":"MDQ6VXNlcjU3NTA=","avatar_url":"https://avatars0.githubusercontent.com/u/5750?v=4","gravatar_id":"","url":"https://api.github.com/users/benjamn","html_url":"https://github.com/benjamn","followers_url":"https://api.github.com/users/benjamn/followers","following_url":"https://api.github.com/users/benjamn/following{/other_user}","gists_url":"https://api.github.com/users/benjamn/gists{/gist_id}","starred_url":"https://api.github.com/users/benjamn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benjamn/subscriptions","organizations_url":"https://api.github.com/users/benjamn/orgs","repos_url":"https://api.github.com/users/benjamn/repos","events_url":"https://api.github.com/users/benjamn/events{/privacy}","received_events_url":"https://api.github.com/users/benjamn/received_events","type":"User","site_admin":false},{"login":"hwillson","id":137740,"node_id":"MDQ6VXNlcjEzNzc0MA==","avatar_url":"https://avatars1.githubusercontent.com/u/137740?v=4","gravatar_id":"","url":"https://api.github.com/users/hwillson","html_url":"https://github.com/hwillson","followers_url":"https://api.github.com/users/hwillson/followers","following_url":"https://api.github.com/users/hwillson/following{/other_user}","gists_url":"https://api.github.com/users/hwillson/gists{/gist_id}","starred_url":"https://api.github.com/users/hwillson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hwillson/subscriptions","organizations_url":"https://api.github.com/users/hwillson/orgs","repos_url":"https://api.github.com/users/hwillson/repos","events_url":"https://api.github.com/users/hwillson/events{/privacy}","received_events_url":"https://api.github.com/users/hwillson/received_events","type":"User","site_admin":false}],"milestone":null,"comments":7,"created_at":"2018-12-13T21:43:41Z","updated_at":"2018-12-23T09:53:15Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/apollographql/react-apollo/pulls/2661","html_url":"https://github.com/apollographql/react-apollo/pull/2661","diff_url":"https://github.com/apollographql/react-apollo/pull/2661.diff","patch_url":"https://github.com/apollographql/react-apollo/pull/2661.patch"},"body":"In the same spirit as https://github.com/apollographql/apollo-client/pull/4234, the bundle footprint of the `react-apollo` package (currently [32.6KB minified, 8.7KB after gzip](https://bundlephobia.com/result?p=react-apollo@2.3.3)) could be, well, I don't know how else to put this: smaller.\r\n\r\nThis PR will serve as a place to collect bundle size improvements of any kind, including but not limited to the following techniques:\r\n* Reimplementing surprisingly heavy dependencies locally, a la 4bac03af40690db68fa79e4fc7df944a7256d861.\r\n* Making it easier to import specific parts of the `react-apollo` package, by supporting multiple entry points, e.g. `react-apollo/browser` and `react-apollo/server`.\r\n* Transforming imports to be more specific using a compiler plugin, so that `import { SpecificThing } from \"react-apollo\"` becomes `import { SpecificThing } from \"react-apollo/lib/specific-thing\"`. If we end up pursuing this approach for `apollo-client`, we will no doubt reuse the same tools here.\r\n* Somehow code-splitting the library, even though dynamic `import()` is not an option for libraries that must be consumed by bundlers with different runtime implementations of dynamic modules.\r\n* Introducing a production bundle in addition to the development bundle, with more aggressive elimination of unnecessary code (e.g. error strings).\r\n* Moving away from monolithic bundles and towards individual modules.\r\n\r\nPull requests targeting the `wip-reduce-bundle-size` branch (rather than `master`) are more than welcome!"},"comment":{"url":"https://api.github.com/repos/apollographql/react-apollo/issues/comments/449625639","html_url":"https://github.com/apollographql/react-apollo/pull/2661#issuecomment-449625639","issue_url":"https://api.github.com/repos/apollographql/react-apollo/issues/2661","id":449625639,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0OTYyNTYzOQ==","user":{"login":"JoviDeCroock","id":17125876,"node_id":"MDQ6VXNlcjE3MTI1ODc2","avatar_url":"https://avatars3.githubusercontent.com/u/17125876?v=4","gravatar_id":"","url":"https://api.github.com/users/JoviDeCroock","html_url":"https://github.com/JoviDeCroock","followers_url":"https://api.github.com/users/JoviDeCroock/followers","following_url":"https://api.github.com/users/JoviDeCroock/following{/other_user}","gists_url":"https://api.github.com/users/JoviDeCroock/gists{/gist_id}","starred_url":"https://api.github.com/users/JoviDeCroock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JoviDeCroock/subscriptions","organizations_url":"https://api.github.com/users/JoviDeCroock/orgs","repos_url":"https://api.github.com/users/JoviDeCroock/repos","events_url":"https://api.github.com/users/JoviDeCroock/events{/privacy}","received_events_url":"https://api.github.com/users/JoviDeCroock/received_events","type":"User","site_admin":false},"created_at":"2018-12-23T09:53:15Z","updated_at":"2018-12-23T09:53:15Z","author_association":"NONE","body":"I have been giving this some thought and for the `pkg.json` wouldn't it be more normal to make the es5 tsc compiled index.js the main and a new rollup generated ES2015 bundle the module. This in turn allows for better tree shaking. I'll make a POC PR this afternoon/evening when I find some time"}}
{"actor":{"display_login":"JoviDeCroock"}}