Skip to content

Commit

Permalink
Make @types/react an optional peerDependency of @mdx-js/react
Browse files Browse the repository at this point in the history
Since `react` is a peerDependency, so should it’s matching type
definitions be. However, in order not to bother people not using
TypeScript, it’s made optional.
  • Loading branch information
remcohaszing committed Mar 29, 2023
1 parent e77be3a commit e91f7a4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
9 changes: 7 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 8 additions & 3 deletions packages/react/package.json
Expand Up @@ -41,11 +41,16 @@
"index.js"
],
"dependencies": {
"@types/mdx": "^2.0.0",
"@types/react": ">=16"
"@types/mdx": "^2.0.0"
},
"peerDependencies": {
"react": ">=16"
"react": ">=16",
"@types/react": ">=16"
},
"peerDependenciesMeta": {
"@types/react": {
"optional": true
}
},
"devDependencies": {
"@mdx-js/mdx": "^2.0.0",
Expand Down

0 comments on commit e91f7a4

Please sign in to comment.