question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support custom `react-scripts` packages

See original GitHub issue

Is 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:closed
  • Created 5 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
chadfawcettcommented, Nov 14, 2018

Resolved by #4712

0reactions
mrmckebcommented, Nov 4, 2018

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

custom-react-scripts - npm
Start using custom-react-scripts in your project by running `npm ... There are 7 other projects in the npm registry using custom-react-scripts.
Read more >
custom-react-scripts/README.md at master - GitHub
Create React App is divided into two packages: create-react-app is a global command-line utility that you use to create new projects. react-scripts is ......
Read more >
Everything you need to know about react-scripts
In React apps, scripts are located in the package.json file's script ... Then, you have to maintain customized react-scripts yourself with ...
Read more >
Creating a Custom, Maintainable React-Scripts Package
UPDATE: This package is now maintained as complete-react-scripts. All references to helpful-react-scripts have been updated to reflect this.
Read more >
Using Create React App for Generating Custom Boilerplates
The react-scripts package is an integral part of CRA. This package, alongside the configuration of the development environment, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found