You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When enabling lib checks in a consuming application or library that uses vitest, but doesn't allow synthetic default imports you'll currently run into this error:
@vitest/utils/dist/index.d.ts(5,8): error TS1192: Module '"util"' has no default export
Reproduction
I think the issue is obvious but let me know if you think otherwise and I'm happy to produce a reproduction repo.
Workaround for now until that change gets released - exclude the test files from type checking:
tsconfig.json
{
"//": "gets rid of the error: 'React' refers to a UMD global, but the current file is a module. Consider adding an import instead.'",
"compilerOptions": {
"jsx": "react-jsx"
},
"include": ["src/**/*"],
"exclude": ["src/**/*.test.tsx", "src/**/*.test.ts"]
}
Describe the bug
When enabling lib checks in a consuming application or library that uses vitest, but doesn't allow synthetic default imports you'll currently run into this error:
Reproduction
I think the issue is obvious but let me know if you think otherwise and I'm happy to produce a reproduction repo.
System Info
Used Package Manager
pnpm
Validations
The text was updated successfully, but these errors were encountered: