Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
aryaemami59 opened this issue Sep 27, 2024 · 0 comments · May be fixed by #1225
Open

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

aryaemami59 opened this issue Sep 27, 2024 · 0 comments · May be fixed by #1225

Comments

@aryaemami59
Copy link
Contributor

aryaemami59 commented Sep 27, 2024

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.

@aryaemami59 aryaemami59 linked a pull request Sep 27, 2024 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant