Skip to content

Cannot use Defu type when using tsconfig paths #159

Closed

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/[email protected]/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

Activity

  1. added
    bug
    on Apr 6, 2026
  2. pi0 commented on Apr 7, 2026

    @pi0
    Member
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions