Skip to content

Commit ec6080d

Browse files
committed
fix: add exports field to graphql-query for ./runtime sub-path resolution
The cli-e2e tests generate ORM code in /tmp and require the runtime sub-path. Without an explicit exports map, Node cannot resolve @constructive-io/graphql-query/runtime. This adds exports for both the root and ./runtime sub-paths (CJS, ESM, and types).
1 parent 34abe3e commit ec6080d

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

graphql/query/package.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,18 @@
66
"main": "index.js",
77
"module": "esm/index.js",
88
"types": "index.d.ts",
9+
"exports": {
10+
".": {
11+
"import": "./esm/index.js",
12+
"require": "./index.js",
13+
"types": "./index.d.ts"
14+
},
15+
"./runtime": {
16+
"import": "./esm/runtime/index.js",
17+
"require": "./runtime/index.js",
18+
"types": "./runtime/index.d.ts"
19+
}
20+
},
921
"homepage": "https://github.com/constructive-io/constructive",
1022
"license": "MIT",
1123
"publishConfig": {

0 commit comments

Comments
 (0)