Support custom `react-scripts` packages
See original GitHub issueIs your feature request related to a problem? Please describe.
CRA supports the flag --scripts-version (it’s not well documented), which they then use to set up CRA.
I can see that storybook is hardcoded to react-scripts. Unfortunately, packages installed with --scripts-version can have a different name than react-scripts, which means storybook no longer loads this config.
Describe the solution you’d like
I propose that we allow users to set the name of the react-scripts package, or try to infer from the react-scripts symlink in .bin.
Describe alternatives you’ve considered
I can rename my package to react-scripts as a workaround, but this can be confusing for users, and others will come across this issue in future.
Are you able to assist bring the feature to reality? Yes, I am happy to. I’m not sure which path to go down:
- Flag during startup
- Environment variable
- Try to understand the symlink path for react-scripts (in .bin)
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (5 by maintainers)

Top Related StackOverflow Question
Resolved by #4712
We can move the conversation to #4712 if you would like. I’ve created an example there, resolving the path of the
react-scriptspackage in use from/.bin/react-scripts.