Skip to content

[Bug]: names / originalFileNames support #2496

@sapphi-red

Description

@sapphi-red

Reproduction link or steps

  1. Open https://stackblitz.com/edit/github-6jajke-ijjg6r?file=rolldown.config.mjs
  2. npm run build runs automatically
  3. see the following output in the terminal
    bundle {
      type: 'asset',
      fileName: 'foo.txt',
      originalFileName: 'originalFileName',
      source: [Getter/Setter],
      name: undefined
    }
    
  4. run npm run build:up to run rollup
  5. see /home/projects/github-6jajke-xxwzrl/src/entry.js true true output in the terminal
  bundle {
    fileName: 'foo.txt',
    name: [Getter],
    names: [],
    needsCodeReference: false,
    originalFileName: [Getter],
    originalFileNames: [ 'originalFileName' ],
    source: 'foooo',
    type: 'asset'
  }

What is expected?

names and originalFileNames is included.

What is actually happening?

names and originalFileNames is not included.

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: https://pkg.pr.new/rolldown@7bc51f0 => 0.13.2

Any additional comments?

related: rollup/rollup#5686

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions