Reputation: 6240
What's the different between using npm shrinkwrap
or always installing dependencies passing the -E
or --save-exact|-E
flag?
ie.: $ npm i redux -SE
-SE being the shorthand to --save --save-exact
I guess shrinkwrap
will also take care of locking 'dependencies of our first level dependencies' but would it be a bad practice to always use --save-exact
instead? If not, when or why would we ever need use the --save-exact
flag?
Edit: I'm also starting to see people suggesting to config npm to install exact versions of dependencies by default:
ie.: $ npm config set save-exact=true
Now, if we do that, do we still need to shrinkwrap
our project?
Upvotes: 2
Views: 337
Reputation: 53
save-exact work like just save this version for you but it wont lock dependecies of dependencies
shrinkwrap makes deep locking.
Upvotes: 1