Created by: merceyz
What's the problem this PR addresses?
-
react-scripts
has a missing peer dependency onreact
-
react-scripts
depends on a version of@pmmmwh/react-refresh-webpack-plugin
which doesn't resolve the imports it injects causing projects to rely on hoisting to bringreact-refresh
to the rootnode_modules
folder which is not guaranteed. -
The templates lack a dependency onDelayed for another timeeslint-config-react-app
making it also rely on hoisting.
Read https://yarnpkg.com/advanced/rulebook#packages-should-only-ever-require-what-they-formally-list-in-their-dependencies for more in depth information about hoisting.
Fixes https://github.com/yarnpkg/berry/runs/1299440256#step:5:132 Fixes https://github.com/facebook/create-react-app/issues/9446 Fixes https://github.com/pnpm/pnpm/issues/2957 Closes https://github.com/facebook/create-react-app/pull/9671
How did you fix it?
-
Add a peer dependency on react
-
AddDelayed for another timeeslint-config-react-app
as a dependency in the templates -
Update @pmmmwh/react-refresh-webpack-plugin
to get https://github.com/pmmmwh/react-refresh-webpack-plugin/pull/230 (cc @pmmmwh)