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

CLI: Add peer dependency on react #20459

Merged
merged 1 commit into from
Jan 1, 2023
Merged

CLI: Add peer dependency on react #20459

merged 1 commit into from
Jan 1, 2023

Conversation

IanVS
Copy link
Member

@IanVS IanVS commented Dec 30, 2022

Issue: #20454

What I did

If we want to check that react is installed by trying to require it, we need to establish a peer dependency on react from the CLI so that yarn pnp and pnpm can work correctly.

The alternative would be to do the react check from some other package that already has the peer dependencies set up, but the CLI seems like the best place.

How to test

Hmmm, not sure...

Copy link
Member

@shilman shilman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. @IanVS what CLI dep requires react/react-dom?

@IanVS
Copy link
Member Author

IanVS commented Jan 1, 2023

@shilman we do a require.resolve() on them in ensure-react-peer-deps.ts

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

Successfully merging this pull request may close these issues.

2 participants