Get the install size of an npm package.
What is Install Size?
The "install size" is the size your hard drive will report after running
npm install. This includes the package you installed, all of the dependencies, and its dependency's dependencies...and so on. —— Quoted from Package Phobia, an online alternative to this package.
One-off usage via
npx npm-size [...package names] # Examples npx npm-size webpack rollup # Local package npx npm-size ./my-package # Exit with error when the size exceeds 5MB npx npm-size ./ --limit 5mb
Or install it globally:
npm i -g npm-size npm-size react vue
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D