-
-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix!: import defineConfig
from kirbyup/config
(#19)
#21
Conversation
defineConfig
behaviour (#19)defineConfig
behaviour (#19)
defineConfig
behaviour (#19)defineConfig
from kirbyup/config
(#19)
Would've said it looks good, but now that I've tested it, it doesn't appear to work :( TS / IntelliSense doesn't pick up on the export, there's no auto-complete and auto-import for |
Node.js v12+ extends package entry points features like subpath exports or conditional exports, but TypeScript supports them only with the {
"compilerOptions": {
"moduleResolution": "NodeNext"
}
}
Reference: microsoft/TypeScript#33079 Because many developers, including myself, are using |
Found the culprit! The downstream project needs to add a {
"compilerOptions": {
"moduleResolution": "Node16"
}
} so TypeScript/IntelliSense correctly resolves With that, suggestions work if you try to import the function and the typings work too. Auto-import still doesn't work, so you can't just type Edit: heh, a couple minutes too late :D |
Update: the workaround is working! Still not for auto-imports, but that might just be a TS/IntelliSense bug or limitation? |
Limitation of the types version workaround. Still, everything we can do upstream inside the package. |
Are you sure? I see the same behavior with |
Good question, I don't know. 👀 |
Fix #19.
@jonaskuske What do you think? Seems like the most straight forward solution.