Skip to content

Commit 931e8e0

Browse files
committed
Export both esm and cjs
1 parent e934528 commit 931e8e0

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

package.json

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,23 @@
99
"license": "MIT",
1010
"author": "GitHub Inc. (https://github.com)",
1111
"type": "module",
12+
"main": "dist/cjs/index.js",
13+
"module": "dist/esm/index.js",
1214
"exports": {
13-
".": "./dist/index.js",
14-
"./decorator": "./dist/decorator.js"
15+
".": {
16+
"module": "./dist/esm/index.js",
17+
"import": "./dist/esm/index.js",
18+
"require": "./dist/cjs/index.js",
19+
"types": "./dist/esm/index.d.ts"
20+
},
21+
"./decorator": {
22+
"module": "./dist/esm/decorator.js",
23+
"import": "./dist/esm/decorator.js",
24+
"require": "./dist/cjs/decorator.js",
25+
"types": "./dist/esm/decorator.d.ts"
26+
}
1527
},
16-
"main": "dist/index.js",
17-
"module": "dist/index.js",
18-
"types": "dist/index.d.ts",
28+
"types": "./dist/esm/index.d.ts",
1929
"files": [
2030
"dist"
2131
],

0 commit comments

Comments
 (0)