这是indexloc提供的服务,不要输入任何密码
Skip to content

experimentalDts does not work with Node16 and NodeNext module resolution #1224

@aryaemami59

Description

@aryaemami59

Overview

Currently experimentalDts does not emit the correct type definitions when moduleResolution is set to either Node16 or NodeNext. The _tsup-dts-rollup.d.ts file is trying to import from the index.d.ts file which causes a circular reference.

_tsup-dts-rollup.d.ts

rollup

index.d.ts

index-circular

Reproduction

  1. Clone the branch containing the reproduction by running:
git clone -b experimentalDts-NodeNext https://github.com/aryaemami59/repros
  1. Install the dependencies:
yarn install
  1. Run the following command:
yarn run build:node-next
  1. Inspect the output in the dist directory.

I will submit a PR for the fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions