Skip to content

Commit 68edcf8

Browse files
authored
Improve CJS type exports (#6)
1 parent b8ff4af commit 68edcf8

File tree

3 files changed

+121
-111
lines changed

3 files changed

+121
-111
lines changed

.changeset/big-balloons-mix.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"html-aria": patch
3+
---
4+
5+
Improve types for CJS imports

package.json

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,14 @@
2121
"main": "./dist/index.js",
2222
"exports": {
2323
".": {
24-
"import": "./dist/index.js",
25-
"require": "./dist/index.cjs",
26-
"types": "./dist/index.d.ts",
24+
"import": {
25+
"types": "./dist/index.d.ts",
26+
"default": "./dist/index.js"
27+
},
28+
"require": {
29+
"types": "./dist/index.d.ts",
30+
"default": "./dist/index.cjs"
31+
},
2732
"default": "./dist/index.js"
2833
},
2934
"./*": "./dist/*.js",
@@ -49,7 +54,7 @@
4954
"@types/aria-query": "^5.0.4",
5055
"aria-query": "^5.3.2",
5156
"jsdom": "^25.0.1",
52-
"rollup": "^4.29.1",
57+
"rollup": "^4.30.0",
5358
"rollup-plugin-cleandir": "^3.0.0",
5459
"tslib": "^2.8.1",
5560
"typescript": "^5.7.2",

0 commit comments

Comments
 (0)