https://github.com/ctrlplusb/react-router-bundlesize
Debugging react-router bundle size optimisation.
https://github.com/ctrlplusb/react-router-bundlesize
Last synced: 8 months ago
JSON representation
Debugging react-router bundle size optimisation.
- Host: GitHub
- URL: https://github.com/ctrlplusb/react-router-bundlesize
- Owner: ctrlplusb
- Created: 2016-07-18T08:11:55.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-07-18T21:00:32.000Z (over 9 years ago)
- Last Synced: 2025-07-04T00:03:37.082Z (8 months ago)
- Language: JavaScript
- Size: 3.91 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
__Issue:__ https://github.com/reactjs/react-router/issues/3642
## Steps to reproduce
Run the following commands
```console
git clone https://github.com/ctrlplusb/react-router-bundlesize
cd react-router-bundlesize
npm install
npm run analyse
```
Then...
- Browse to http://webpack.github.io/analyse/
- Select the `build/stats.json` file.
- 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.
## Expected Behavior
Don'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.
## Actual Behavior
There 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.
