Skip to content

[Bug]: outputOptions hook is called (the number of outputOptions) * 2 times #3570

@sapphi-red

Description

@sapphi-red

Reproduction link or steps

  1. Open https://stackblitz.com/edit/github-nci4o6nk-d5tpqdnm?file=rolldown.config.mjs
  2. npm i runs automatically
  3. npm run build runs automatically
  4. See called! output 4 times
  5. Run npm run build:up to check rollup's behavior
  6. See called! output 2 times

What is expected?

called! to be output (the number of outputOptions) times (2 times in this case).

What is actually happening?

called! is output (the number of outputOptions) * 2 times (4 times in this case).

System Info

Stackblitz

  System:
    OS: Linux 5.0 undefined
    CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 18.20.3 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.2.3 - /usr/local/bin/npm
    pnpm: 8.15.6 - /usr/local/bin/pnpm
  npmPackages:
    rolldown: 1.0.0-beta.3-commit.964a30d => 1.0.0-beta.3-commit.964a30d

Any additional comments?

I found this while testing rolldown-vite with ecosystem-ci, checking if outputOptions hook can be used to set advancedChunks option.

refs #3316

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions