Skip to content

Commit 19836d9

Browse files
authored
chore: add types to exports field to be compatible with nodenext module resolution (#1522)
See [1] for detail, in `nodenext` module resolution it requires a `types` field in `exports` with full filename including extension. [1]: microsoft/TypeScript#46770 (comment) Reference: https://www.typescriptlang.org/tsconfig/#module
1 parent 71e34a3 commit 19836d9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626
"node": "./build/esm-debug/index.js",
2727
"default": "./build/esm/index.js"
2828
},
29-
"require": "./build/cjs/index.js"
29+
"require": "./build/cjs/index.js",
30+
"types": "./build/esm/index.d.ts"
3031
}
3132
},
3233
"types": "./build/esm/index.d.ts",

0 commit comments

Comments
 (0)