https://github.com/atomicojs/rollup-plugin-sizes
This small utility allows you to monitor the size of the bundle as it is generated by rollup, generating a record by console, the size of both in gzip and brotli.
https://github.com/atomicojs/rollup-plugin-sizes
brotli gzip rollup
Last synced: 3 months ago
JSON representation
This small utility allows you to monitor the size of the bundle as it is generated by rollup, generating a record by console, the size of both in gzip and brotli.
- Host: GitHub
- URL: https://github.com/atomicojs/rollup-plugin-sizes
- Owner: atomicojs
- Created: 2019-05-25T06:43:19.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-07-19T09:45:39.000Z (about 5 years ago)
- Last Synced: 2025-07-04T19:46:22.428Z (3 months ago)
- Topics: brotli, gzip, rollup
- Language: JavaScript
- Homepage:
- Size: 126 KB
- Stars: 8
- Watchers: 0
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# @atomico/rollup-plugin-sizes
This small utility allows you to monitor the size of the bundle as it is generated by rollup, generating a record by console, the size of both in gzip and brotli.

```js
import sizes from "@atomico/rollup-plugins-sizes";export default {
input: /*...*/,
output: /*...*/,
plugins: [
sizes(10)//10 === 10kb
]
};
```Additionally you can give `sizes(limit:number|string)` a first parameter capable of generating alerts by console, example `size(1.2)`, **this parameter will always represent KB**.
1. if it exceeds the limit, the file will be printed in red.
2. If it approaches 90% of the limit, it will be printed in yellow.
3. if it does not fulfill the 2 previous conditions, it is printed in green.> compatible with dynamic rollup import