npm 审计仅用于依赖项? [英] npm audit only for dependencies?

查看:38
本文介绍了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

这篇关于npm 审计仅用于依赖项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆