跳到主内容
版本:9.x

pnpm prune

移除不需要的 packages

配置项

--prod

Remove the packages specified in devDependencies.

--no-optional

Remove the packages specified in optionalDependencies.

warning

prune 命令目前不支持在 monorepo 中递归执行。 To only install production-dependencies in a monorepo node_modules folders can be deleted and then re-installed with pnpm install --prod.