npm.devtool.tech
👏 You can access bundle-size package with using bundleSize variable in browser devtools!
Show bundle file size of npm packages

basic

package
Npm Version
Node Version

popularity

Star
Npm Weekly Downloads
Jsdeliver Month Downloads
Dependents Pkg
Dependents Repo

size

Code Size
Publish Size
Install Size
Minified Size
Gzip Size

quality

Open Issues
Tree Shaking Support
Type Support
Last Commit

health

Package health
Dependency Count
Outdated Dep
Vulnerablities

Build Status Coverage Status Code Climate

bundle-size

Show bundle file size of npm packages

Installation

$ npm install bundle-size

Usage

in CLI

$ bundle-size --help
Show bundle file size of npm packages

Usage
  bundle-size [packages] [options]

Options
  -e, --env         set NODE_ENV
  -h, --help        show help
  -r, --reporter    output style (json)
  -v, --version     print version

Example:

bundle-size react
bundle-size react --env development
bundle-size react -e development -e production

in Node.js module

const bundleSize = require('bundle-size');

bundleSize(['react', 'redux'], { env: ['development', 'production'] }).then((results) => {
  console.log(results);
});

// react@15.2.1, redux@3.5.2
//
// env          bundle     minify    gzip
// --           155.65 kB  78.43 kB  24.78 kB
// development  150.89 kB  71.58 kB  23.54 kB
// production   150.81 kB  57.87 kB  18.28 kB

License

MIT © mkwtys