Skip to content

Commit 8688cf3

Browse files
author
EGOIST
committed
fix: publish as esm module, fixes #26
1 parent 5cda62e commit 8688cf3

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

package.json

+7-2
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,15 @@
88
"files": [
99
"dist"
1010
],
11-
"main": "./dist/index.js",
1211
"types": "./dist/index.d.ts",
12+
"exports": {
13+
".": {
14+
"import": "./dist/index.mjs",
15+
"default": "./dist/index.js"
16+
}
17+
},
1318
"scripts": {
14-
"build": "tsup src/index.ts --format cjs --dts",
19+
"build": "tsup src/index.ts --format cjs,esm --dts",
1520
"test": "npm run build && uvu -r esbuild-register --ignore fixtures",
1621
"prepublishOnly": "npm run build"
1722
},

0 commit comments

Comments
 (0)