node.js - What's the difference between depenencies and devDependencies with NPM 5 -
the below question refers project i'm not publishing npm
.
in npm 3, if had package in devdependencies
, ran shrinkwrap (without --development
) npm-shrinkwrap.json
not include packages in devdependencies
.
but npm 5, packages in dependencies
, devdependencies
added package-lock.json
, devdependencies
having "dev": true
.
so, if i'm using npm install x
add packages , npm install
install on, say, build server, package listed in dependencies
treated differently package listed in devdependencies
?
it make sense on production. when you'll need install packages, except dev.
npm --production
from npmjs.org:
with --production flag (or when node_env environment variable set production), npm not install modules listed in devdependencies.
Comments
Post a Comment