Closed NiGhTTraX closed 2 years ago
If @dawnmist or others can confirm this is needed --- happy to merge.
I haven't used Create React App or react-app-rewired for a number of years now so relying on others to let me know if this breaks or maintains things.
My only concern with this is that we're now tying react-scripts to a particular version of cross-spawn separately to whatever version is in use by the particular version of react-scripts that the user is using. In that respect #530 may be a more flexible/future-proof solution.
Does anyone have an example mini-repo that triggers the issue that I can use for testing the fix against? I can create a "normal" example, but not having used yarn workspaces it'll take me longer to try to put something together to test that the bug is actually fixed.
Hey @dawnmist, check out https://github.com/NiGhTTraX/react-app-rewired-bug-457 for reproduction. I tried both this PR and #530 and they both fix the issue.
Closing this now that #530 is merged.
This fixes the issue where a package manager doesn't hoist
react-dev-utils
so we can require it directly. The particular path we're requiring just re-exports cross-spawn so I've added it as a direct dependency.Fixes #457 and is an alternative to #530.