ritz078/rollup-plugin-filesize

Why output gzipped size when I am not writing a gzip?

Closed this issue · 7 comments

With my current rollup config I am not writing a gzip to the destination folder. But your plugin still displays gzip stats. Not necessary and confusing in my opinion. Can the plugin be smarter?

It can be made optional.

yeah please, that would be cool

try v1.4.1 and set showGzippedSize: false in options.

yeah @ritz078 it works, but the implementation could be better: there is no need to calculate gzipSize unnecessarily when it's not shown, see

let gzipSize = fileSize(gzip.sync(code), opts.format);

add a conditional there ...

... plus the file is too wide, better break it at column 80 or so.

Ya sure. I will do those when I have a bit of time. I just made a quick release for now so that it solves your problem.

Done in 1.4.2