Types not working on import
SevYote opened this issue Β· comments
Heya, ran into some issues trying out honeycomb-grid where imports didn't seem to be working right, which ultimately lead me to this thread.
I used patch-package to patch honeycomb-grid@4.1.1
as shown in the diff below. That got me going, but I'm not sure if that's actually the proper / ideal way to do it. Hopefully it gets you down the right path to a fix, though. This site from that thread gives some more info.
diff --git a/node_modules/honeycomb-grid/package.json b/node_modules/honeycomb-grid/package.json
index 5f36957..c0f71dd 100644
--- a/node_modules/honeycomb-grid/package.json
+++ b/node_modules/honeycomb-grid/package.json
@@ -8,7 +8,10 @@
"types": "dist/index.d.ts",
"exports": {
".": {
- "import": "./dist/honeycomb-grid.mjs",
+ "import": {
+ "default": "./dist/honeycomb-grid.mjs",
+ "types": "./dist/index.d.ts"
+ },
"require": "./dist/honeycomb-grid.umd.js"
}
},
This issue body was partially generated by patch-package.
Thanks. I'll look into it later.
just deleting the exports
block also fixed it for me. I'm not sure why it worked before.
upgrading to TS5 fixed it for me, but I couldn't repro the problem at all in a blank project so /shrug the problem spontaneously came back five minutes later with no changes
Sorry for the late fix π¬
π This issue has been resolved in version 4.1.2 π
The release is available on:
Your semantic-release bot π¦π
Unfortunately this is not fixed @flauwekeul, the package.json references a file located at "./dist/index.d.ts" but the file is actually located at "./src/dist/index.d.ts"
Sorry haha ;D
Ugh π I should've tested it. Trying to fix it now.
π This issue has been resolved in version 4.1.3 π
The release is available on:
Your semantic-release bot π¦π
<3