Skip to content

Cannot use Defu type when using tsconfig paths #159

@mattmess1221

Description

@mattmess1221

Environment

N/a

Reproduction

N/a

Describe the bug

When defu is defined in tsconfig paths, like in nuxt, the Defu type cannot be used. When Defu is imported, it is improperly resolved to a value.

// tsconfig.json
{
  "compilerOptions": {"paths": {
    "defu": ["node_modules/.pnpm/defu@6.1.6/node_modules/defu"]
  }}
}
// index.ts
import type { Defu } from 'defu'
//            ^?  Defu: any

Probably caused by 407b516 changing the types key to lib/defu.d.cts

Additional context

No response

Logs

Metadata

Metadata

Assignees

No one assigned

    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