https://github.com/vimeo/rollup-plugin-bundle-size
A rollup plugin to show the size of the generated bundle(s).
https://github.com/vimeo/rollup-plugin-bundle-size
Last synced: 6 months ago
JSON representation
A rollup plugin to show the size of the generated bundle(s).
- Host: GitHub
- URL: https://github.com/vimeo/rollup-plugin-bundle-size
- Owner: vimeo
- License: mit
- Created: 2016-08-22T20:51:09.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2023-03-13T00:43:30.000Z (almost 3 years ago)
- Last Synced: 2025-04-19T12:35:59.963Z (9 months ago)
- Language: JavaScript
- Homepage:
- Size: 6.84 KB
- Stars: 28
- Watchers: 10
- Forks: 13
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# rollup-plugin-bundle-size [](https://www.npmjs.com/package/rollup-plugin-bundle-size)
> A rollup plugin to show the size of the generated bundle(s).
## Sample Output
```bash
$ 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
```bash
npm install --save-dev rollup-plugin-bundle-size
```
## Usage
### JS API
```js
const rollup = require('rollup');
const bundleSize = require('rollup-plugin-bundle-size');
rollup.rollup({
entry: 'src/index.js',
plugins: [
bundleSize()
]
}).then((bundle) => {
...
});
```
### Config File
```js
import bundleSize from 'rollup-plugin-bundle-size';
export default {
entry: 'src/index.js',
plugins: [
bundleSize()
]
}
```