Skip to content

Commit a7c10ca

Browse files
committed
fix: make typescript also use commonjs types
1 parent d4965e8 commit a7c10ca

File tree

1 file changed

+61
-21
lines changed

1 file changed

+61
-21
lines changed

package.json

Lines changed: 61 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -46,34 +46,74 @@
4646
"publishConfig": {
4747
"imports": {
4848
"#config/*": {
49-
"types": "./lib/config/*.d.ts",
50-
"require": "./lib/config/*.cjs",
51-
"import": "./lib/config/*.mjs",
52-
"default": "./lib/config/*.mjs"
49+
"require": {
50+
"types": "./lib/config/*.d.ts",
51+
"default": "./lib/config/*.cjs"
52+
},
53+
"import": {
54+
"types": "./lib/config/*.d.ts",
55+
"default": "./lib/config/*.mjs"
56+
},
57+
"default": {
58+
"types": "./lib/config/*.d.ts",
59+
"default": "./lib/config/*.mjs"
60+
}
5361
},
5462
"#constants/*": {
55-
"types": "./lib/config/*.d.ts",
56-
"require": "./lib/constants/*.cjs",
57-
"import": "./lib/constants/*.mjs",
58-
"default": "./lib/constants/*.mjs"
63+
"require": {
64+
"types": "./lib/constants/*.d.ts",
65+
"default": "./lib/constants/*.cjs"
66+
},
67+
"import": {
68+
"types": "./lib/constants/*.d.ts",
69+
"default": "./lib/constants/*.mjs"
70+
},
71+
"default": {
72+
"types": "./lib/constants/*.d.ts",
73+
"default": "./lib/constants/*.mjs"
74+
}
5975
},
6076
"#core/*": {
61-
"types": "./lib/core/*.d.ts",
62-
"require": "./lib/core/*.cjs",
63-
"import": "./lib/core/*.mjs",
64-
"default": "./lib/core/*.mjs"
77+
"require": {
78+
"types": "./lib/core/*.d.ts",
79+
"default": "./lib/core/*.cjs"
80+
},
81+
"import": {
82+
"types": "./lib/core/*.d.ts",
83+
"default": "./lib/core/*.mjs"
84+
},
85+
"default": {
86+
"types": "./lib/core/*.d.ts",
87+
"default": "./lib/core/*.mjs"
88+
}
6589
},
6690
"#interface/*": {
67-
"types": "./lib/interface/*.d.ts",
68-
"require": "./lib/interface/*.cjs",
69-
"import": "./lib/interface/*.mjs",
70-
"default": "./lib/interface/*.mjs"
91+
"require": {
92+
"types": "./lib/interface/*.d.ts",
93+
"default": "./lib/interface/*.cjs"
94+
},
95+
"import": {
96+
"types": "./lib/interface/*.d.ts",
97+
"default": "./lib/interface/*.mjs"
98+
},
99+
"default": {
100+
"types": "./lib/interface/*.d.ts",
101+
"default": "./lib/interface/*.mjs"
102+
}
71103
},
72104
"#util/*": {
73-
"types": "./lib/util/*.d.ts",
74-
"require": "./lib/util/*.cjs",
75-
"import": "./lib/util/*.mjs",
76-
"default": "./lib/util/*.mjs"
105+
"require": {
106+
"types": "./lib/util/*.d.ts",
107+
"default": "./lib/util/*.cjs"
108+
},
109+
"import": {
110+
"types": "./lib/util/*.d.ts",
111+
"default": "./lib/util/*.mjs"
112+
},
113+
"default": {
114+
"types": "./lib/util/*.d.ts",
115+
"default": "./lib/util/*.mjs"
116+
}
77117
}
78118
}
79119
},
@@ -118,4 +158,4 @@
118158
"engines": {
119159
"node": ">=18.0.0"
120160
}
121-
}
161+
}

0 commit comments

Comments
 (0)