react-router: De-duplicate devDependencies
With the monorepo, each package is installing its devDependencies in its own node_modules. For me, this led to the react-router folder weighing in at ~234MB. A lot of these are duplicated across packages and should be able to be moved to the root package.json. The only ones that can’t, as noted by the lerna documentation are the ones that need binaries to run (i.e., karma).
For reference, across each package.json each dependency is included the following number of times:
| Package | Count |
|---|---|
| babel-cli | 2 |
| babel-core | 1 |
| babel-eslint | 2 |
| babel-loader | 3 |
| babel-plugin-dev-expression | 2 |
| babel-plugin-transform-react-remove-prop-types | 2 |
| babel-preset-es2015 | 3 |
| babel-preset-react | 3 |
| babel-preset-stage-1 | 3 |
| bundle-loader | 1 |
| copy-webpack-plugin | 1 |
| css-loader | 1 |
| eslint | 2 |
| eslint-plugin-import | 2 |
| eslint-plugin-react | 2 |
| expect | 2 |
| file-loader | 1 |
| gzip-size | 2 |
| html-loader | 1 |
| html-webpack-plugin | 1 |
| in-publish | 2 |
| jsxstyle | 1 |
| karma | 2 |
| karma-browserstack-launcher | 2 |
| karma-chrome-launcher | 2 |
| karma-mocha | 2 |
| karma-mocha-reporter | 2 |
| karma-sourcemap-loader | 2 |
| karma-webpack | 2 |
| markdown-it | 1 |
| markdown-it-anchor | 1 |
| mocha | 2 |
| postcss-loader | 1 |
| pretty-bytes | 2 |
| prismjs-loader | 1 |
| react | 4 |
| react-addons-test-utils | 2 |
| react-dom | 3 |
| react-motion | 1 |
| react-native | 1 |
| readline-sync | 2 |
| style-loader | 1 |
| sw-precache | 1 |
| sw-precache-webpack-plugin | 1 |
| url-loader | 1 |
| webpack | 3 |
| webpack-dev-server | 3 |
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 26 (21 by maintainers)
Commits related to this issue
- De-dup dev deps Fixes #4362 — committed to remix-run/react-router by mjackson 7 years ago
- Revert the switch to yarn workspaces :'( The react-router-native tests don't pass anymore on master, so I'm reverting this until we can figure out why. Re-opens #4362 — committed to remix-run/react-router by mjackson 7 years ago
- Use yarn to manage dependencies Fixes #4362 — committed to remix-run/react-router by mjackson 7 years ago
- Use yarn to manage dependencies Fixes #4362 — committed to remix-run/react-router by mjackson 7 years ago
@mjackson I’ve worked around it by something like this, works fine if a bit ugly:
Actually, https://github.com/lerna/lerna/pull/507 should take care of this. When that lands, let’s revisit.