Should react-scripts be in dependencies or devDependencies?
See original GitHub issueWhen bootstraping a new project, the react-scripts
is listed in dependencies
, but the docs suggests that should be in devDependencies
. See updating-to-new-releases.md:
react-scripts is a development dependency in the generated projects (including this one).
And this image in the landing page:
I’m guessing that the previous versions worked fine in devDependencies
, but something changed and the docs wasn’t updated.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:4
- Comments:5
Top Results From Across the Web
Consider moving react-scripts to devDependencies in the ...
From that perspective, all dependencies (including React) are "dev" dependencies because they're only necessary for the build: once you build ...
Read more >How to do a react build, when react-scripts is marked as dev ...
Browsing around this I see react-scripts should ideally be a Dev-dependency. So just wanted to check if anyone can help here, how to...
Read more >devDependencies vs Dependencies in reactJS - Medium
devDependencies are packages used for development purposes, e.g for running tests or transpiling your code. Many packages that you install ...
Read more >react-scripts - npm
Configuration and scripts for Create React App.. Latest version: 5.0.1, last published: 9 months ago. Start using react-scripts in your ...
Read more >Difference between dependencies, devDependencies and ...
As you install a package, npm will automatically install the dev dependencies. peerDependencies are not automatically installed. You need to ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Duh - it’s late and I misread your issue @luanorlandi !
It should be in dependencies but the image on https://create-react-app.dev/ is now out of date, and https://create-react-app.dev/docs/updating-to-new-releases mentions “development dependency” The image is definitely misleading, and the statement above could be misinterpreted
Projects started with
--template typescript
end up with all DefinitlyTyped dependencies and TypeScript itself independencies
as well instead of underdevDependencies
.