-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Default export type not being picked up with module: "nodenext"
#2208
Labels
Comments
This can be referenced as well: microsoft/TypeScript#48845 |
After TypeScript 5.0 got released. This could be a workaround {
"compilerOptions": {
"moduleResolution": "bundler",
}
} https://devblogs.microsoft.com/typescript/announcing-typescript-5-0-beta/#moduleresolution-bundler |
This still doesn't work for me. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug report
Description / Observed Behavior
When trying to use imported useSWR hook I'm getting the following error:
Expected Behavior
Import should pick-up typings
Repro Steps / Code Example
"type": "module"
to package.jsonAdditional Context
SWR version: ^1.3.0
Typescript version: ^4.8.4
3 possible fixes:
export default useSWR;
=>export = useSWR;
"module": "nodenext"
compatible fastify/fastify-cookie#184The text was updated successfully, but these errors were encountered: