Skip to content

fake js is kept as-is for export interface in declare module 'external' #66

@sapphi-red

Description

@sapphi-red

Describe the bug

For

interface PluginContextExtension {}

declare module 'rolldown' {
  export interface MinimalPluginContext extends PluginContextExtension {}
}

the dts output is

//#region input.d.ts
interface PluginContextExtension {}
[1, () => PluginContextExtension, sideEffect()];

//#endregion

which is not a valid dts.

This works with rolldown 1.0.0-beta.29, but started to fail after rolldown/rolldown@04aa9de.
(Note that the reproduction does not include pnpm.overrides and thus works fine.)

This is breaking building Vite itself.

Reproduction

https://stackblitz.com/edit/rolldown-rolldown-starter-stackblitz-btbe9spb?file=input.ts,package.json

System Info

System:
    OS: Linux 6.6 Ubuntu 24.04.2 LTS 24.04.2 LTS (Noble Numbat)
    CPU: (32) x64 AMD Ryzen 9 9950X 16-Core Processor
    Memory: 11.87 GB / 23.46 GB
    Container: Yes
    Shell: 5.2.21 - /bin/bash
  Binaries:
    Node: 22.16.0 - ~/.local/share/asdf/data/installs/nodejs/22.16.0/bin/node
    npm: 10.9.2 - ~/.local/share/asdf/data/plugins/nodejs/shims/npm
    pnpm: 10.13.1 - ~/.local/share/asdf/data/installs/nodejs/22.16.0/bin/pnpm
    bun: 1.2.17 - ~/.local/share/asdf/data/shims/bun

Used Package Manager

pnpm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions