使用npm包时,如何快速查看该包及其所依赖的包的体积?如使用request包(https://www.npmjs.com/package... var request = require('request');发现其所依赖的包是一个大列表:knoword-client, tenon-node, podcast-parser, salaries-indeed, carwings2, nullbot-client, vpm-http, tsheets-sdk, gh-release, convo-builder, firmament, bower-art-resolver, gmail-batch-stream, nwjs-download, yo-kf5, smartcitizen, enclout-node, sdh-core-bot, static-code-analysis, hget, oai-pmh, neocrawler, planet-stream, jrequest, hdwallet, oys, goproh4, wolly, ghost-cli, mjtb-unidata, clack, twitch-api, tessel, dicio, cleverbot, cleverbot.io, node-gh-trending, lookupstuff, warmup, grasshopper-core, spacekit, hkit, bugsnag, coviu-sdk-oauth2, samplr, grunt-mustache-render, reddit-subs, hds-js-sdk, feed-read, bot-canalplus, and more并且这些依赖项更有各自的依赖,依此递归到叶子包.如果在Node.js中使用,当然没问题。但如果基于webpack或其它打包工具用于browser中,使用它最终给前端文件增加多少体积,令人堪忧。除了直接地看npm包对应的github中dist/packname.min.js的大小 及其依赖项的多少外,大家还有没有更好的办法? 谢谢!!!
添加回答
举报
0/150
提交
取消