Skip to content

[Bug]: Nondeterministic build output for externalized default imports with different local names #9754

Description

@naruaway

Reproduction link or steps

https://github.com/naruaway-sandbox/20260615-rolldown-nondeterministic-build-repro

What is expected?

When the build input is fixed, the build output should be fixed (deterministic)

What is actually happening?

Rolldown randomly choose a symbol name to be used in the build output in this case, which makes the build non deterministic

System Info

System:
    OS: macOS 26.4.1
    CPU: (16) arm64 Apple M4 Max
    Memory: 15.47 GB / 64.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 26.0.0 - /opt/homebrew/bin/node
    Yarn: 1.22.22 - /opt/homebrew/bin/yarn
    npm: 11.12.1 - /opt/homebrew/bin/npm
    pnpm: 11.5.2 - /opt/homebrew/bin/pnpm
    bun: 1.3.14 - /opt/homebrew/bin/bun
    Deno: 2.6.6 - /opt/homebrew/bin/deno
    Watchman: 2026.01.12.00 - /opt/homebrew/bin/watchman
  Browsers:
    Safari: 26.4

Any additional comments?

I just put "System Info" as instructed but the repro https://github.com/naruaway-sandbox/20260615-rolldown-nondeterministic-build-repro uses Pnpm with a fixed Pnpm/Node.js version (latest) for better reproducibility of the issue

Metadata

Metadata

Assignees

No one assigned

    Type

    Fields

    Priority

    None yet

    Effort

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions