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

Filesize gets logged twice

Open brunoscopelliti opened this issue 6 years ago • 1 comments

I'm on windows 10, and using Rollup version 1.1.2. When I run rollup the output is produced, but the filesize information is logged twice. I'm using Rollup through its programmatic api:

const config = {
  input: "src/...",
  output: {
    file: "dist/...",
    format: "iife",
    name: "Foo",
    banner: "...",
  },
  plugins: [
    // Other plugins ...
    filesize({
      render(_, bundle, { gzipSize, bundleSize }){
        const filename = bundle.file.split("\\").slice(-1)[0];
        return `${filename}: ${bundleSize} (${gzipSize} gzipped).`;
      }
    }),
  ],
}

const bundle = await rollup.rollup(config);
await bundle.generate(config.output);
await bundle.write(config.output);

brunoscopelliti avatar Jan 31 '19 15:01 brunoscopelliti

@speedcuber911 You want to look into this? should be a very small fix.

ritz078 avatar Feb 21 '19 10:02 ritz078