Answer the question
In order to leave comments, you need to log in
NPM Difference between dep and devDep. Where to install eslint, prettier?
Hello, if I'm not mistaken,
dependenciesit is set that when building (result) will be used in the project, and with the prefix
dev, then what is used for development, right? I think it's better to install eslint and prettier in a section
devDependencies. But I'm reading a guide for installing these modules, and the author uses
-d, which is respectively set in
dependenciesand this is where I confused myself. Maybe I'm wrong and prettier with eslint needs to be installed in the section
dependencies
Answer the question
In order to leave comments, you need to log in
`npm install` saves any specified packages into `dependencies` by default.
Additionally, you can control where and how they get saved with some
additional flags:
* `-P, --save-prod`: Package will appear in your `dependencies`. This is the
default unless `-D` or `-O` are present.
* `-D, --save-dev`: Package will appear in your `devDependencies`.
* `-O, --save-optional`: Package will appear in your `optionalDependencies`.
* `--no-save`: Prevents saving to `dependencies`.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question