bundle-size
v1.1.5
Published
Show bundle file size of npm packages
Downloads
4,209
Readme
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);
});
// [email protected], [email protected]
//
// 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