Node.js · Junior · Question 22 of 75
What is the difference between dependencies and devDependencies?
- ✓Correct answer:
dependenciesare needed to run the app;devDependenciesare only needed for development and building - 2
devDependenciesare installed globally - 3There is no difference; the names are just for readability
Explanation
Test runners, linters and bundlers go in devDependencies (npm i -D). npm install --omit=dev installs only production dependencies, which keeps production images smaller.