Skip to content

[Bug]: outputOptions hook is called before build hooks #3609

@sapphi-red

Description

@sapphi-red

Reproduction link or steps

  1. Open https://stackblitz.com/edit/github-nci4o6nk-smotzcsu?file=rolldown.config.mjs
  2. npm i runs automatically
  3. npm run build runs automatically

What is expected?

outputOptions hook is called after all the transform hooks.
In other words, the output is:

transform
transform
called!

outputOptions hook is one of the output generation hook which runs after all the build hooks.
https://rollupjs.org/plugin-development/#output-generation-hooks

What is actually happening?

outputOptions hook is called before all the transform hooks.
In other words, the output is:

called!
transform
transform

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.b546e53 => 1.0.0-beta.3-commit.b546e53

Any additional comments?

This was found together with #3570

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions