Created by: merceyz
What's the problem this PR addresses?
-
react-scriptshas a missing peer dependency onreact -
react-scriptsdepends on a version of@pmmmwh/react-refresh-webpack-pluginwhich doesn't resolve the imports it injects causing projects to rely on hoisting to bringreact-refreshto the rootnode_modulesfolder which is not guaranteed. -
The templates lack a dependency onDelayed for another timeeslint-config-react-appmaking 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-appas a dependency in the templates -
Update @pmmmwh/react-refresh-webpack-pluginto get https://github.com/pmmmwh/react-refresh-webpack-plugin/pull/230 (cc @pmmmwh)