-
Bug reportDescription / Observed BehaviorPOV: using Typescript I was importing (Besides and I dug a bit found out the directory(exports) in package.json might be given the wrong path. Expected BehaviorHow did you expect SWR to behave here? Well, hope the type will work :D Repro Steps / Code ExampleSWR version: 2.0.0 simply just follow the tutorial and with this line of code: import useSWRMutation from 'swr/mutation'; Additional Contextthe current workaround: I copied the d.ts into local d.ts |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
and here's my tsconfig.json {
"compilerOptions": {
"target": "esnext",
"baseUrl": ".",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noImplicitAny": true,
"noEmit": true,
"incremental": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "nodenext",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve"
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", "**/*.js"],
"exclude": ["node_modules"]
} |
Beta Was this translation helpful? Give feedback.
-
Hi, @koba04 thanks if reply :D |
Beta Was this translation helpful? Give feedback.
Hi, @koba04
I found out the bug report was moved to here.
I was wondering is it my code set up wrong or SWR really did given the wrong path ?
thanks if reply :D