npm如何去重一个依赖的不同版本的依赖?
How does npm dedupe the dependencies of different versions of a dependency?
为了更好地解释我的问题,我有一个依赖树的简化版本:
A --> B@1.0.0 --> D@1.0.0 --> E@1.0.0
A --> C@1.0.0 --> D@2.0.0 --> E@1.0.0
Legend:
=======
A: Root component
B & C: Dependencies of A
D: Components that are not deduped, because of different major versions.
E: Components that in my opinion should be deduped, but aren't.
为什么组件E没有去重?
我正在使用 npm@2.9.0
NPM 3 将对此进行修复。使用测试版,看看它是否能解决您的问题。
为了更好地解释我的问题,我有一个依赖树的简化版本:
A --> B@1.0.0 --> D@1.0.0 --> E@1.0.0
A --> C@1.0.0 --> D@2.0.0 --> E@1.0.0
Legend:
=======
A: Root component
B & C: Dependencies of A
D: Components that are not deduped, because of different major versions.
E: Components that in my opinion should be deduped, but aren't.
为什么组件E没有去重?
我正在使用 npm@2.9.0
NPM 3 将对此进行修复。使用测试版,看看它是否能解决您的问题。