Skip to content

type re-export not working #67

@hi-ogawa

Description

@hi-ogawa

Describe the bug

input

  • index.ts
export type { Dep } from "./dep"

export const main = "main";
  • dep.ts
export type Dep = "dep"

output

  • index.js
const main = "main";

export { main };
  • index.d.ts
export { Dep } from "./dep.js";  // <- error since `dep.d.ts` not emitted
export declare const main = "main";

This seems to have broken Vitest build vitest-dev/vitest#7867

Reproduction

https://github.com/hi-ogawa/reproductions/tree/main/unplugin-isolated-decl-type-re-export

System Info

"rollup": "^4.40.0",
"unplugin-isolated-decl": "0.13.7",
"unplugin-oxc": "^0.3.4"

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions