Skip to content

Commit ab6f158

Browse files
committed
add exports field to support Node.js ESM
1 parent 6453612 commit ab6f158

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

package.json

+39
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,45 @@
1515
},
1616
"sideEffects": false,
1717
"homepage": "https://github.com/graphql/graphql-js",
18+
"exports": {
19+
".": {
20+
"require": "./index.js",
21+
"import": "./index.mjs"
22+
},
23+
"./package.json": "./package.json",
24+
"./error": {
25+
"require": "./error/index.js",
26+
"import": "./error/index.mjs"
27+
},
28+
"./execution": {
29+
"require": "./execution/index.js",
30+
"import": "./execution/index.mjs"
31+
},
32+
"./language": {
33+
"require": "./language/index.js",
34+
"import": "./language/index.mjs"
35+
},
36+
"./subscription": {
37+
"require": "./subscription/index.js",
38+
"import": "./subscription/index.mjs"
39+
},
40+
"./type": {
41+
"require": "./type/index.js",
42+
"import": "./type/index.mjs"
43+
},
44+
"./utilities": {
45+
"require": "./utilities/index.js",
46+
"import": "./utilities/index.mjs"
47+
},
48+
"./validation": {
49+
"require": "./validation/index.js",
50+
"import": "./validation/index.mjs"
51+
},
52+
"./*": {
53+
"require": "./*.js",
54+
"import": "./*.mjs"
55+
}
56+
},
1857
"bugs": {
1958
"url": "https://github.com/graphql/graphql-js/issues"
2059
},

0 commit comments

Comments
 (0)