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

add .cts and .mts type declerations for EACH built format #28

Closed
spencercap opened this issue Jun 28, 2023 · 0 comments
Closed

add .cts and .mts type declerations for EACH built format #28

spencercap opened this issue Jun 28, 2023 · 0 comments

Comments

@spencercap
Copy link
Member

spencercap commented Jun 28, 2023

recent changes in tsup versions >=7.1.0 have introduced multiple built ts type dec files per format. see this PR: egoist/tsup#934

and also this comment about how to adjust package.json's exports block accordingly:
total-typescript/shoehorn#9 (comment)

{
  "exports": {
    ".": {
      "import": {
        "types": "./dist/index.d.mts",
        "default": "./dist/index.mjs"
      },
      "require": {
        "types": "./dist/index.d.ts",
        "default": "./dist/index.js"
      }
    }
  }
}
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

No branches or pull requests

1 participant