egoist / egoist/tsup

tsup dts is not aware exports defined in package.json

Open
#822 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
11.3k
Forks
275
PR merge metrics
No merged PRs in 30d

Description

```
CLI Target: esnext
CLI Cleaning output folder
ESM Build start
ESM dist/index.js 5.01 KB
ESM dist/index.js.map 24.93 KB
ESM ⚡️ Build success in 55ms
DTS Build start
src/create-yargs.ts(2,55): error TS2307: Cannot find module '@armit/logger/node' or its corresponding type declarations.

Error: error occured in dts build
at Worker. (/Users/tianyingchun/Documents/armitjs/armit/node_modules/tsup/dist/index.js:2226:26)
```

```index.ts
import { StdoutAdapter, TerminalFormatStrategy } from '@armit/logger/node';

```
```json
@armit/logger / package.json
"type": "module",
"exports": {
".": {
"import": "./index.js",
"types": "./dist/index.d.ts"
},
"./node": {
"import": "./dist/node/index.js",
"types": "./dist/node/index.d.ts"
},
"./web": {
"import": "./dist/web/index.js",
"types": "./dist/web/index.d.ts"
},
"./package.json": "./package.json"
},
-
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.