Skip to content

Commit b7a6856

Browse files
committed
chore: export types before module
tsup currently (and correctly) warns that our `types` exports come after our module exports, so are never read. If we place them first, they will be resolved for both the import and require, and the warnings will go away.
1 parent 978fb7b commit b7a6856

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,19 +37,19 @@
3737
},
3838
"exports": {
3939
".": {
40+
"types": "./dist/index.d.ts",
4041
"import": "./dist/index.js",
41-
"require": "./dist/index.cjs",
42-
"types": "./dist/index.d.ts"
42+
"require": "./dist/index.cjs"
4343
},
4444
"./citty": {
45+
"types": "./dist/citty.d.ts",
4546
"import": "./dist/citty.js",
46-
"require": "./dist/citty.cjs",
47-
"types": "./dist/citty.d.ts"
47+
"require": "./dist/citty.cjs"
4848
},
4949
"./cac": {
50+
"types": "./dist/cac.d.ts",
5051
"import": "./dist/cac.js",
51-
"require": "./dist/cac.cjs",
52-
"types": "./dist/cac.d.ts"
52+
"require": "./dist/cac.cjs"
5353
}
5454
},
5555
"packageManager": "[email protected]+sha512.76e2379760a4328ec4415815bcd6628dee727af3779aaa4c914e3944156c4299921a89f976381ee107d41f12cfa4b66681ca9c718f0668fa0831ed4c6d8ba56c"

0 commit comments

Comments
 (0)