Skip to content

Commit 1dc9fd1

Browse files
fix: correctly export both esm and cjs types (#72)
1 parent 08cd832 commit 1dc9fd1

File tree

3 files changed

+28
-6
lines changed

3 files changed

+28
-6
lines changed

.changeset/nasty-crabs-explain.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@sigmacomputing/react-embed-sdk": minor
3+
"@sigmacomputing/embed-sdk": minor
4+
---
5+
6+
fix: update package.json to correctly export both cjs and esm types

packages/embed-sdk/package.json

+11-3
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,18 @@
2626
"typecheck": "tsc --noEmit",
2727
"test": "echo \"Error: no test specified\" && exit 1"
2828
},
29+
"main": "./dist/index.js",
30+
"module": "./dist/index.mjs",
31+
"types": "./dist/index.d.ts",
2932
"exports": {
30-
"import": "./dist/index.mjs",
31-
"require": "./dist/index.js",
32-
"types": "./dist/index.d.ts"
33+
"import": {
34+
"import": "./dist/index.mjs",
35+
"types": "./dist/index.d.mts"
36+
},
37+
"require": {
38+
"require": "./dist/index.js",
39+
"types": "./dist/index.d.ts"
40+
}
3341
},
3442
"files": [
3543
"dist"

packages/react-embed-sdk/package.json

+11-3
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,18 @@
2626
"lint": "eslint . --ext .ts,.tsx",
2727
"test": "echo \"Error: no test specified\" && exit 1"
2828
},
29+
"main": "./dist/index.js",
30+
"module": "./dist/index.mjs",
31+
"types": "./dist/index.d.ts",
2932
"exports": {
30-
"import": "./dist/index.mjs",
31-
"require": "./dist/index.js",
32-
"types": "./dist/index.d.ts"
33+
"import": {
34+
"import": "./dist/index.mjs",
35+
"types": "./dist/index.d.mts"
36+
},
37+
"require": {
38+
"require": "./dist/index.js",
39+
"types": "./dist/index.d.ts"
40+
}
3341
},
3442
"files": [
3543
"dist"

0 commit comments

Comments
 (0)