Skip to content

Commit b9a5fc6

Browse files
committed
feat: add exports field to package.json for ESM-only environments
1 parent 406c459 commit b9a5fc6

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

package.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@
55
"main": "lib/cjs/index.js",
66
"typings": "lib/cjs/index.d.ts",
77
"module": "lib/esm/index.js",
8+
"exports": {
9+
".": {
10+
"types": "./lib/cjs/index.d.ts",
11+
"import": "./lib/esm/index.js",
12+
"require": "./lib/cjs/index.js"
13+
},
14+
"./package.json": "./package.json"
15+
},
816
"scripts": {
917
"prepack": "run-s lint test build",
1018
"postpack": "run-s clean",

0 commit comments

Comments
 (0)