如上图,项目依赖4个包,但这4个包又同时依赖同样的包,就会出现重复下载,重复依赖
导致整个项目包很大,该如何解决这个问题?
在仅依赖chokidar、node-sass、uglify-js时,执行npm install后对比
npm2 install:22,118,854 字节
npm2 install后dedupe:16,834,945 字节npm3 install:18,026,936 字节
npm3 install后dedupe:15,366,266 字节
迷茫2017-04-10 17:37:23
The packages marked in your screenshot should be considered as different packages although with same the same package name "async". Because these packages are of different versions.