yarn remove
yarn remove <package...>
正在运行yarn remove foo
将删除您的直接依赖项中指定的程序包foo
,用于更新过程中的文件package.json
和yarn.lock
文件。
其他开发该项目的开发人员可以运行yarn install
同步他们自己的node_modules
目录和更新后的一组依赖项。
当你删除一个包时,它是从所有类型的依赖关系删除dependencies
,devDependencies
等。
Note:
yarn remove
will always update yourpackage.json
andyarn.lock
. This ensures that different developers on the same project get the same set of dependencies. It is not possible to disable this behavior. Note:yarn remove <package> --<flag>
uses the sameflag
s asyarn install
command.
本文档系腾讯云开发者社区成员共同维护,如有问题请联系 cloudcommunity@tencent.com