You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
which would install only dependencies and fooDependencies, but not devDependencies.
This could be useful for special cases where for example devDependencies is for local development, but during deployment you need a slightly different set of dependencies. For example, the following package.json is for a hypothetical deployment to Vercel:
and the deployment would be configured to run npm clean-install --include vercel and to run something specific like npm run build:vercel specifically for that case.
This would avoid installing unnecessary dependencies in different scenarios.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Given this
package.json
:I want to be able to do this:
which would install only
dependencies
andfooDependencies
, but notdevDependencies
.This could be useful for special cases where for example
devDependencies
is for local development, but during deployment you need a slightly different set of dependencies. For example, the following package.json is for a hypothetical deployment to Vercel:and the deployment would be configured to run
npm clean-install --include vercel
and to run something specific likenpm run build:vercel
specifically for that case.This would avoid installing unnecessary dependencies in different scenarios.
Beta Was this translation helpful? Give feedback.
All reactions