rollup-plugin-filesize icon indicating copy to clipboard operation
rollup-plugin-filesize copied to clipboard

Build size differences

Open shellscape opened this issue 7 years ago • 2 comments

Great work on this plugin :tada:

In looking through the source and reading the docs here it struck me that there might be another vector for useful information in this plugin: build size differences. Keeping track of config hashes or some other somewhat-static element and caching build sizes based on an identifier (say, in a file in a temp directory, or in the module itself) and displaying size increases or decreases, might be useful to folks.

shellscape avatar Jul 27 '18 13:07 shellscape

How do you define the base size ?

ritz078 avatar Jul 27 '18 17:07 ritz078

I'd find something I could hash (like the config, or the set of files in the bundle) and then store the hash along with the resulting file size for a build. Then reference that hash and base value for subsequent builds that matched the hash.

shellscape avatar Jul 27 '18 18:07 shellscape