Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit e12da18

Browse files
Nitivemattphillips
authored andcommitted
Fix typings resolution when using TypeScript 4.7+ with ESM
TypeScript in ESM mode is trying to use file index.d.mts for types but there is no such file. So we need to provide custom path to typings file. Root `types` field is ignored in ESM mode
1 parent ba84464 commit e12da18

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"exports": {
88
".": {
99
"import": "./mjs/index.js",
10-
"require": "./cjs/index.js"
10+
"require": "./cjs/index.js",
11+
"types": "./index.d.ts"
1112
}
1213
},
1314
"types": "./index.d.ts",

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /