Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make react-dom optional peerDependency #5503

Open
proohit opened this issue Oct 21, 2022 · 2 comments · May be fixed by #5507
Open

Make react-dom optional peerDependency #5503

proohit opened this issue Oct 21, 2022 · 2 comments · May be fixed by #5507

Comments

@proohit
Copy link

proohit commented Oct 21, 2022

Description

I would suggest to make react-dom an optional peerDependency, since pure react-native projects don't use react-dom at all.

Problem Statement

The current forced peerDependency causes projects with no react-dom in their dependencies to cause an error with recent npm versions.

Proposed Solution or API

Add a peerDependencyMeta attribute inside package.json and declare react-dom as optional:

...
"peerDependencyMeta": {
   "react-dom": {
     "optional": true
   }
},
...
@Viraj-10
Copy link
Collaborator

Hi @proohit, Thanks for reporting. We will do that, If you want to be a contributor, please do these changes and I will approve your PR. 😄

@proohit proohit linked a pull request Oct 25, 2022 that will close this issue
@proohit
Copy link
Author

proohit commented Oct 25, 2022

Sure thing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants