Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Support declarationMap #449

@hjkcai

Description

@hjkcai

Description

Is it possible to support tsconfig's declarationMap? It is awesome to directly jump to source code via .d.ts.map inside monorepo. Thanks a lot!

I tried version 1.0.0-beta.6. Setting declarationMap to true in tsconfig does not work.

Suggested solution

I digged a little bit into unplugin-dts's source code. There is a flag forceDtsEmit set to true that prevents ts from emitting .d.ts.map. I tried to simply remove this flag and then there are .d.ts.maps outputted.

Ref: https://github.com/qmhc/unplugin-dts/blob/main/packages/unplugin-dts/src/core/runtime.ts#L410

Alternative

No response

Additional context

  • Version: 1.0.0-beta.6
  • TypeScript Version: 5.4.5

Validations

  • Read the FAQ.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    pendingNeed further confirmation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions