npm 审核仅针对生产依赖项?

npm 审核仅针对生产依赖项?

问题描述:

目前,在项目中运行 npm audit 时,它会检查 dependenciesdevDependencies.我正在寻找一种仅检查 dependencies 的方法.目前有办法吗?

Currently, when running npm audit in a project, it checks both the dependencies and the devDependencies. I am looking for a way to only check the dependencies. Is there currently a way to do so?

在 npm 6.10.0 中发布了对 --production 标志的支持

Support for --production flag was released in npm 6.10.0

https://github.com/npm/cli/pull/202

npm audit --production