{"action":"created","issue":{"url":"https://api.github.com/repos/reactjs/react-router/issues/3642","repository_url":"https://api.github.com/repos/reactjs/react-router","labels_url":"https://api.github.com/repos/reactjs/react-router/issues/3642/labels{/name}","comments_url":"https://api.github.com/repos/reactjs/react-router/issues/3642/comments","events_url":"https://api.github.com/repos/reactjs/react-router/issues/3642/events","html_url":"https://github.com/reactjs/react-router/issues/3642","id":166047123,"number":3642,"title":"Bundle output is not optimised despite importing from `lib`","user":{"login":"ctrlplusb","id":12164768,"avatar_url":"https://avatars.githubusercontent.com/u/12164768?v=3","gravatar_id":"","url":"https://api.github.com/users/ctrlplusb","html_url":"https://github.com/ctrlplusb","followers_url":"https://api.github.com/users/ctrlplusb/followers","following_url":"https://api.github.com/users/ctrlplusb/following{/other_user}","gists_url":"https://api.github.com/users/ctrlplusb/gists{/gist_id}","starred_url":"https://api.github.com/users/ctrlplusb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ctrlplusb/subscriptions","organizations_url":"https://api.github.com/users/ctrlplusb/orgs","repos_url":"https://api.github.com/users/ctrlplusb/repos","events_url":"https://api.github.com/users/ctrlplusb/events{/privacy}","received_events_url":"https://api.github.com/users/ctrlplusb/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-07-18T08:48:32Z","updated_at":"2016-07-18T20:57:22Z","closed_at":"2016-07-18T13:12:23Z","body":"## Version\r\n2.5.2\r\n\r\n## Test Case\r\nhttps://github.com/ctrlplusb/react-router-bundlesize\r\n\r\n## Steps to reproduce\r\n\r\n_Note: I was using node v6_\r\n\r\nRun the following commands\r\n```console\r\ngit clone https://github.com/ctrlplusb/react-router-bundlesize\r\ncd react-router-bundlesize\r\nnpm install\r\nnpm run analyse\r\n```\r\n\r\nThen... \r\n- Browse to http://webpack.github.io/analyse/\r\n- Select the `build/stats.json` file.\r\n- Go to the \"modules\" section and look for `react-router` imports.  You will see imports for code that is not being used. e.g. createHashHistory.\r\n\r\n## Expected Behavior\r\n\r\nDon't include unnecessary modules from `react-router` and `history` in bundle output when following the guidelines from the [Minimizing Bundle Size](https://github.com/reactjs/react-router/blob/master/docs/guides/MinimizingBundleSize.md) docs.\r\n\r\n## Actual Behavior\r\n\r\nThere are imports that I am not using/importing.  The below screenshot isn't the exhaustive list, but you can see references to `createHashHistory` for example whilst in my source I explicitly import `react-router/lib/browserHistory`.  A few others too.\r\n\r\n<img width=\"640\" alt=\"screenshot 2016-07-18 09 39 45\" src=\"https://cloud.githubusercontent.com/assets/12164768/16909733/5d7ad786-4ccc-11e6-9133-67cc05e05c76.png\">\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/reactjs/react-router/issues/comments/233456415","html_url":"https://github.com/reactjs/react-router/issues/3642#issuecomment-233456415","issue_url":"https://api.github.com/repos/reactjs/react-router/issues/3642","id":233456415,"user":{"login":"ctrlplusb","id":12164768,"avatar_url":"https://avatars.githubusercontent.com/u/12164768?v=3","gravatar_id":"","url":"https://api.github.com/users/ctrlplusb","html_url":"https://github.com/ctrlplusb","followers_url":"https://api.github.com/users/ctrlplusb/followers","following_url":"https://api.github.com/users/ctrlplusb/following{/other_user}","gists_url":"https://api.github.com/users/ctrlplusb/gists{/gist_id}","starred_url":"https://api.github.com/users/ctrlplusb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ctrlplusb/subscriptions","organizations_url":"https://api.github.com/users/ctrlplusb/orgs","repos_url":"https://api.github.com/users/ctrlplusb/repos","events_url":"https://api.github.com/users/ctrlplusb/events{/privacy}","received_events_url":"https://api.github.com/users/ctrlplusb/received_events","type":"User","site_admin":false},"created_at":"2016-07-18T20:57:22Z","updated_at":"2016-07-18T20:57:22Z","body":"Oki great thanks for the info @taion - I look forward to the v3 release. :)\r\n\r\n@timdorr my bad! I didn't save down the dependency.  I was in fact using the latest webpack 2, which of course includes tree-shaking features.  It doesn't seem to be having a major impact on react-router thus far.  I'll retry with v3 though."}}
{"actor":{"display_login":"ctrlplusb"}}