Skip to content

[Bug]: duplicated default import #3199

@nstepien

Description

@nstepien

Reproduction link or steps

Repo branch: Comcast/react-data-grid#3578

  • git clone https://github.com/adazzle/react-data-grid.git
  • git checkout rolldown
  • npm i
  • npm run build
  • open lib/bundle.js
  • notice that that the default export of clsx is imported multiple times with different identifiers
    import clsx, { default as clsx$1, default as clsx$2, default as clsx$3, default as clsx$4, default as clsx$5, default as clsx$6, default as clsx$7 } from "clsx";

What is expected?

I'd expect the following import to not result in multiple imports.

import clsx from "clsx";

What is actually happening?

The clsx default export is imported under multiple identifiers.

System Info

System:
    OS: Windows 11 10.0.26100
    CPU: (64) x64 AMD Ryzen Threadripper 3970X 32-Core Processor
    Memory: 11.11 GB / 31.88 GB
  Binaries:
    Node: 23.5.0 - C:\Program Files\nodejs\node.EXE
    npm: 11.0.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Chromium (131.0.2903.99)
    Internet Explorer: 11.0.26100.1882
  npmPackages:
    rolldown: ^0.15.1 => 0.15.1

Any additional comments?

The CJS output (lib/bundle.cjs) does not have this issue.
Rollup does not have this issue either.

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions