The difference between dependencies and devDependencies in package.json

First of all, the dependencies installed in dependencies are the dependencies of the production environment, that is, the packages that must be installed for the project to run; the dependencies installed in devDependencies are the dependencies of the open environment, that is, the dependencies that need to be installed when developing the project.

Secondly, when installing dependencies, npm install packageName --save-dev is installed in devDependencies, and npm install packageName --save is installed in dependencies. When npm install, all dependencies are installed by default.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324932902&siteId=291194637