Progress: resolved 1530, reused 1454, downloaded 1, added 1, pnpm安装时这几个数字是什么意思? 为什么装一个依赖,会有resolved成百上千个 #11
leno23
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
我来解释一下 pnpm 安装时这些数字的含义:
各个数字的意思
resolved 1530 - 解析的包数量
reused 1454 - 复用的包数量
downloaded 1 - 下载的包数量
added 1 - 添加到项目的包数量
node_modules的包数量为什么安装一个依赖会 resolved 成百上千个?
这是因为 依赖树(dependency tree) 的存在:
举个例子:
react,它可能依赖 10 个包现代前端项目的特点:
lodash的每个方法都可以作为单独的包安装pnpm 的优势:
这就是为什么现代 JavaScript 项目的
node_modules文件夹会这么大的原因!Beta Was this translation helpful? Give feedback.
All reactions