node-docker-good-defaults
node-docker-good-defaults copied to clipboard
Use npm ci instead of npm install?
Isn't it better to use npm ci
instead of npm install
here we get exactly same node_modules by package-lock.json?
Initially, npm ci
would fix to lock yes, but would also install dev dependencies always, which I didn't want. Do you know if they've fixed that?
At least in [email protected] npm ci
does not install devDeps if NODE_ENV is 'production' or the --production
flag is set.
If you've a multistage build that starts with a development NODE_ENV and ends in a production one, you can use npm prune
to get node_modules to a production only state.
Sounds good, thanks!