Commit dded428
Fix types declaration entry path for clients/js (#647)
The package's `types` (and the `types` export condition) point to
`./dist/types/index.d.ts`, but the build emitted the entry to
`./dist/types/src/index.d.ts`, so consumers resolved no type
declarations at all (attw: "No types" on node10, node16, and bundler).
The cause was `include: ["src", "*.ts"]`: the `*.ts` glob pulled in
`tsup.config.ts` at the package root, which raised the declaration
rootDir to the package directory and prefixed all emitted declarations
with `src/`. Setting `rootDir: "src"` and narrowing `include` to
`["src"]` makes tsc emit the entry to the declared `./dist/types/index.d.ts`.
Co-authored-by: Jon <jon@anza.xyz>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent bcee1e5 commit dded428
1 file changed
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | | - | |
| 16 | + | |
16 | 17 | | |
0 commit comments