- ⚖️ Find the cost of adding a new dev dependency to your project
- 🕗 Save yourself time and disk space with this web app
- 📈 Detect javascript bloat over time with a chart
- 🛡️ Get a badge/shield for your README
- 📡 Fetch size from json API to integrate into any tool
...as seen on npm weekly and ponyfoo weekly and habr and rwpod and wolf report and all over twitter
Package Phobia reports the size of an npm package before you install it.
This is useful for inspecting potential devDependencies
without using up precious disk space or waiting minutes for npm install
. Ain't nobody got time for dat.
Results are saved so the first person might wait a bit to view package size, but everyone else gets to see the results instantly!
A good use case might be comparing test runners, web frameworks, or even bundlers. Click one of the links below to see Package Phobia in action!
- Test Harnesses: tap vs tape
- Web Frameworks: express vs micro
- JavaScript Bundlers: webpack vs rollup
- Task Runners: grunt vs gulp
- HTTP Requests: request vs node-fetch
- Glob Patterns: glob vs tiny-glob
- Site Generators: gatsby vs hexo
- Type Checkers: typescript vs flow-bin
- Linters: eslint vs jslint
- Command Line Interfaces: @angular/cli vs @babel/cli
- Desktop Frameworks: nw vs electron
- Headless Browsers: puppeteer vs phantom
- Package Managers: npm vs yarn
Package Phobia is inspired by Bundle Phobia and Cost Of Modules.
- Package Phobia reports the install size of a package.
- Bundle Phobia reports the size after webpack bundles the package.
- Cost Of Modules reports the size of your currently installed packages.
- Badge Size reports the gzip size of a single file from a package.
- Bundle Size fails CI if a file's size is too large.
- Package Size compares the bundle size of multiple packages
- Require So Slow traces the time of each
require
module in a node.js app. - Why Bundled? uses webpack stats to show your number of imports and package size.
- Do you even lift? - NEW reports size after rollup bundles the package.
Did you install a package and compare the size on disk with the size reported on Package Phobia?
This might be difference because Package Phobia doesn't know anything about your hard drive so it can't predict how blocks are allocated.
Packages are known to contain many small .js
files which can actually use up a lot of disk space.
See StackOverflow for more details.
Ideally, this information could be listed on npmjs.com, npms.io, or bundlephobia.com.
Below are the relevant feature requests for each website.
- GitHub issue for bundlephobia.com
- GitHub issue for npmjs.com
- GitHub issue for npms.io
- GitHub issue for staticgen.com
- GitHub issue for cost-of-modules
- GitHub issue for npm-cli
Hopefully, this would lead to publishers taking notice of their bloated packages such as the following:
- micro is not micro
- ava is not minimal
- typescript has doubled in size since v2.0.0
- bundlesize is 10x larger after npm install since v0.14.0
I'm not the first one to notice npm packages are snowballing into bloated dependencies of dependencies.
- thomasfuchs
- ben_a_adams
- devrant
- turnoff.us
- styfle
- davej
- FredyC
- tomitrescak
- maybekatz
- hichaelmart
- brad_frost
See CONTRIBUTING.md and CODE_OF_CONDUCT.md before you start writing any code
Developed by ceriously.com