Skip to content

Why are typescript and various @types packages installed as dependencies instead of devDependencies? #9421

Answered by iansu
ledhed2222 asked this question in Q&A
Discussion options

You must be logged in to vote

Nothing is actually needed to run the app after building it. React and ReactDOM, along with all other dependencies and your code are all included in the compiled bundle. Since the app has no runtime dependencies it doesn't matter if you list dependencies under dependencies or devDependencies.

The reason we chose to use dependencies is because certain platforms like Heroku will only install dependencies when they build your app (this used to be true, I'm not sure if it still is).

When people submit PRs to "fix" this we usually direct them to this comment: #6180 (comment).

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by iansu
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants