Skip to content

A rollup plugin to show the size of the generated bundle(s).

License

Notifications You must be signed in to change notification settings

vimeo/rollup-plugin-bundle-size

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rollup-plugin-bundle-size npm

A rollup plugin to show the size of the generated bundle(s).

Sample Output

$ rollup -c
src/project.js → dist/project.bundle.js...
Created bundle project.bundle.js: 52.53 kB → 18.29 kB (gzip)
created dist/project.bundle.js in 3.5s

Installation

npm install --save-dev rollup-plugin-bundle-size

Usage

JS API

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

rollup.rollup({
    entry: 'src/index.js',
    plugins: [
        bundleSize()
    ]
}).then((bundle) => {
    ...
});

Config File

import bundleSize from 'rollup-plugin-bundle-size';

export default {
    entry: 'src/index.js',
    plugins: [
        bundleSize()
    ]
}

About

A rollup plugin to show the size of the generated bundle(s).

Resources

License

Stars

Watchers

Forks

Packages

No packages published