Skip to content

Commit 5026ab2

Browse files
committed
fix: create common-js exports
1 parent 1765964 commit 5026ab2

File tree

5 files changed

+18
-3
lines changed

5 files changed

+18
-3
lines changed

.changeset/clean-dingos-work.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@labdigital/federated-token-apollo": patch
3+
"@labdigital/federated-token": patch
4+
---
5+
6+
Create CommonJS exports

packages/apollo/package.json

+7
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,15 @@
33
"version": "0.13.1",
44
"description": "Federate JWT tokens between Apollo servers",
55
"module": "./dist/index.js",
6+
"main": "./dist/index.cjs",
67
"types": "./dist/index.d.ts",
78
"type": "module",
9+
"exports": {
10+
".": {
11+
"import": "./dist/index.js",
12+
"require": "./dist/index.cjs"
13+
}
14+
},
815
"keywords": [
916
"graphql",
1017
"authentication",

packages/apollo/tsup.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default defineConfig([
77
splitting: false,
88
dts: true,
99
sourcemap: true,
10-
format: ["esm"],
10+
format: ["esm", "cjs"],
1111
outDir: "dist",
1212
},
1313
]);

packages/core/package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,13 @@
33
"version": "0.13.0",
44
"description": "Federate JWT tokens between Apollo servers",
55
"module": "./dist/index.js",
6+
"main": "./dist/index.cjs",
67
"types": "./dist/index.d.ts",
78
"exports": {
89
"./package.json": "./package.json",
910
".": {
10-
"import": "./dist/index.js"
11+
"import": "./dist/index.js",
12+
"require": "./dist/index.cjs"
1113
}
1214
},
1315
"type": "module",

packages/core/tsup.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default defineConfig([
77
splitting: false,
88
dts: true,
99
sourcemap: true,
10-
format: ["esm"],
10+
format: ["esm", "cjs"],
1111
outDir: "dist",
1212
},
1313
]);

0 commit comments

Comments
 (0)