Skip to content

Filesize gets logged twice #39

@brunoscopelliti

Description

@brunoscopelliti

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);

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions