Skip to content

Commit 3cc7d6d

Browse files
committed
[added] Peer dependency on history package
Fixes #2211 Fixes #2252
1 parent b73bb1c commit 3cc7d6d

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,11 @@ We support all browsers and environments where React runs.
2828

2929
#### npm + webpack/browserify
3030

31-
$ npm install [email protected]
31+
Install using [npm](https://www.npmjs.com/):
32+
33+
$ npm install history react-router@latest
34+
35+
Note that you need to also install the [history](https://www.npmjs.com/package/history) package since it is a peer dependency of React Router and won't automatically be installed for you in npm 3+.
3236

3337
Then with a module bundler or webpack, use as you would anything else:
3438

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,12 @@
2424
],
2525
"license": "MIT",
2626
"dependencies": {
27-
"history": "1.12.3",
2827
"invariant": "^2.0.0",
2928
"warning": "^2.0.0"
3029
},
30+
"peerDependencies": {
31+
"history": "~1"
32+
},
3133
"devDependencies": {
3234
"babel": "^5.4.7",
3335
"babel-core": "^5.4.7",
@@ -41,6 +43,7 @@
4143
"express": "^4.13.3",
4244
"express-urlrewrite": "^1.2.0",
4345
"gzip-size": "^3.0.0",
46+
"history": "^1.12.5",
4447
"karma": "^0.13.8",
4548
"karma-browserstack-launcher": "^0.1.4",
4649
"karma-chrome-launcher": "^0.2.0",

0 commit comments

Comments
 (0)