Closed vsanrocha closed 2 years ago
Hmm thats fairly interesting, could you post your tsconfig
?
@vsanrocha could you provide more information on this? - tsconfig
would be a great start!
I have the same issue
{
"baseUrl": "./src",
"paths": {
"@assets/*": ["./assets/*"],
"@components/*": ["./components/*"],
"@contexts/*": ["./contexts/*"],
"@datasource/*": ["./datasource/*"],
"@pages/*": ["./pages/*"],
"@router/*": ["./router/*"],
"@shared/*": ["./shared/*"],
"@store/*": ["./store/*"],
"@utils/*": ["./utils/*"]
},
"compilerOptions": {
"target": "ES2020",
"lib": [
"dom",
"dom.iterable",
"ES2020"
],
"allowJs": false,
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noFallthroughCasesInSwitch": true,
"module": "ES2020",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react-jsx"
},
"references": [{ "path": "./tsconfig.node.json" }],
"include": [
"src"
]
}
@Hellek thank you for that! Ill check what the issue is, there wasnt any changes there on my end so it might be a vite change. Are you using vite latest version?
I was also getting the same issue and upgrading to the latest vite
version seems to have fixed it! Ended upgrading to vitest
version to the latest too - 0.12.6
❌ 2.9.7
✅ 2.9.9
Already working on a fix, this is due to some changes of the vite plugin api!
Finally had the chance to test against the latest version of vitest
and vite
. It doesnt seem to be an issue anymore, so the fix is now redundant. If you still encounter this Issue, feel free to post on this Issue again! But please try the latest version of each package beforehand.
When I use the plugin in TS file, it's throwing a type error.
My vite.config.ts file