$ npm install @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.
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.
compatible with dynamic rollup import
© 2010 - cnpmjs.org x YWFE | Home | YWFE