Is the "--save"-flag really necessary to write an installed dependency to the "package.json"-file.
I have tried it out without the "save"-flag and the package was afterward nevertheless within the "dependencies"-section. So the adding seem to be default-behaviour.
So, therefore my question: What benefit provides the standard "save"? Or can one leave it as well ?
Not the "save-dev". That's clear to me.
As of npm 5.0.0 , installed modules are added as a dependency by default, so the --save
option is no longer needed. The other save options still exist and are listed in the documentation for npm install
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.