Skip to content

Commit 9cb816b

Browse files
rubencarvalhocaseyisonitRajdeepc
authored
chore: add typesVersion to core (#5866)
* chore: add typesVersion to core * chore: add changeset * apply sort fixes from bot --------- Co-authored-by: Casey Eickhoff <48574582+caseyisonit@users.noreply.github.com> Co-authored-by: Rajdeep Chandra <rajrock38@gmail.com>
1 parent a374260 commit 9cb816b

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

.changeset/three-teeth-joke.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@spectrum-web-components/core': patch
3+
'@spectrum-web-components/base': patch
4+
---
5+
6+
- **Fixed**: Added `typesVersions` to `@spectrum-web-components/core` to improve TypeScript module resolution for users with `moduleResolution: "node"`. This provides a fallback mechanism when the `exports` field resolution encounters issues, ensuring type declarations are properly resolved across different TypeScript configurations.

2nd-gen/packages/core/package.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,19 @@
4848
"prepublishOnly": "yarn build"
4949
},
5050
"types": "./dist/index.d.ts",
51+
"typesVersions": {
52+
"*": {
53+
"components/*": [
54+
"dist/components/*"
55+
],
56+
"shared/*": [
57+
"dist/shared/*"
58+
],
59+
"shared/base/*": [
60+
"dist/shared/base/*"
61+
]
62+
}
63+
},
5164
"dependencies": {
5265
"lit": "^2.5.0 || ^3.1.3"
5366
},

0 commit comments

Comments
 (0)