Skip to content

[Bug]: modules that are inlined completely is not included in chunk.moduleIds #8100

Description

@sapphi-red

Reproduction link or steps

https://stackblitz.com/edit/qprnsrj7?file=rolldown.config.js

What is expected?

[
  {
    name: 'index1',
    moduleIds: [ '/home/projects/a85lhgmo--run/index1.js', '/home/projects/a85lhgmo--run/bar.js' ]
  },
  {
    name: 'index2',
    moduleIds: [ '/home/projects/a85lhgmo--run/index2.js', '/home/projects/a85lhgmo--run/bar.js' ]
  }
]

to be output by console.log when bundling.

What is actually happening?

[
  {
    name: 'index1',
    moduleIds: [ '/home/projects/a85lhgmo--run/index1.js' ]
  },
  {
    name: 'index2',
    moduleIds: [ '/home/projects/a85lhgmo--run/index2.js' ]
  }
]

is output by console.log when bundling.

System Info

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: 20.19.1 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.8.2 - /usr/local/bin/npm
    pnpm: 8.15.6 - /usr/local/bin/pnpm
  npmPackages:
    @rolldown/browser:  1.0.0-rc.1

Any additional comments?

Actually, I'm not sure if the expected behavior makes sense. In Rollup, moduleIds only contains a same module once across all the chunks. But if we implement the expected behavior I suggested, that would no longer be true.

Metadata

Metadata

Assignees

No one assigned

    Type

    Fields

    Priority

    None yet

    Effort

    None yet

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions