-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Add support for custom react-scripts
packages
#4712
Add support for custom react-scripts
packages
#4712
Conversation
Generated by 🚫 dangerJS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need some CLI test fixture for this IMO
Codecov Report
@@ Coverage Diff @@
## next #4712 +/- ##
==========================================
+ Coverage 35.51% 35.55% +0.04%
==========================================
Files 557 557
Lines 6775 6739 -36
Branches 901 885 -16
==========================================
- Hits 2406 2396 -10
+ Misses 3899 3882 -17
+ Partials 470 461 -9
Continue to review full report at Codecov.
|
Certainly @igor-dv and @ndelangen, I'll take a look at doing this over the weekend. Hopefully it'll be fairly straight-forward to test. And thanks for your review too @chadfawcett. |
Add support for custom `react-scripts` packages
I've played a bit with this in #4836 and It doesn't find for me the |
@igor-dv, this is working for my team on Windows (WSL) and MacOS. Can you give more details of what you're seeing? |
When I am debuggin this: let reactScriptsPath;
function getReactScriptsPath() {
if (reactScriptsPath) return reactScriptsPath;
const appDirectory = fs.realpathSync(process.cwd());
const reactScriptsScriptPath = fs.realpathSync(
path.join(appDirectory, '/node_modules/.bin/react-scripts')
);
reactScriptsPath = path.join(reactScriptsScriptPath, '../..');
return reactScriptsPath;
} in
Then
And after when we are tring to use `isReactScriptsInstalled that does
path to |
And does it work for you outside of that environment @igor-dv? And are you using WSL? I'm not home now, but can take a look later. |
Didn't check it outside. I am just using a regular windows 10 |
Even tests (cra-config) are failing locally for me, but passing in CI. Probably a windows thing =( |
Issue: #4681
What I did
Added support for
react-scripts
packages with names other thanreact-scripts
.How to test
Create a fork of
react-scripts
with a different name (or use an existing), and use that for your--scripts-version
when runningcreate-react-app
.