Skip to content

Commit 231a42a

Browse files
committed
Fix openapi package exports: use bun/types/import pattern
The exports map pointed all conditions at source ./index.ts, which breaks Node after build — index.ts imports ./specParser.js but only .ts source files exist. Node needs the built dist/ files. Use the same pattern as other packages: bun→source for dev, types/import→dist for Node. Drop the unused publishConfig.exports since this package is private. Fixes: bin.js spec exited with code 1: ERR_MODULE_NOT_FOUND Committed-By-Agent: claude
1 parent b91b5fc commit 231a42a

1 file changed

Lines changed: 3 additions & 11 deletions

File tree

packages/openapi/package.json

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,9 @@
55
"type": "module",
66
"exports": {
77
".": {
8-
"types": "./index.ts",
9-
"import": "./index.ts",
10-
"default": "./index.ts"
11-
}
12-
},
13-
"publishConfig": {
14-
"exports": {
15-
".": {
16-
"types": "./dist/index.d.ts",
17-
"import": "./dist/index.js"
18-
}
8+
"bun": "./index.ts",
9+
"types": "./dist/index.d.ts",
10+
"import": "./dist/index.js"
1911
}
2012
},
2113
"scripts": {

0 commit comments

Comments
 (0)