Skip to content

Commit 1a48730

Browse files
adriencacciaclaude
andcommitted
fix(vitest-plugin): add tsconfig paths for vite 8 type resolution
Vite 8 removed the `main` and `types` top-level fields from its package.json, relying entirely on the `exports` map. Since the base tsconfig uses `moduleResolution: "node"` (TypeScript 4.9.4), the compiler cannot resolve `import { Plugin } from "vite"` without an explicit path mapping. Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 30fd0e4 commit 1a48730

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

packages/vitest-plugin/tsconfig.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@
33
"compilerOptions": {
44
"outDir": "dist",
55
"rootDir": "src",
6-
"typeRoots": ["node_modules/@types", "../../node_modules/@types"]
6+
"baseUrl": ".",
7+
"typeRoots": ["node_modules/@types", "../../node_modules/@types"],
8+
"paths": {
9+
"vite": ["node_modules/vite/dist/node"]
10+
}
711
},
812
"references": [{ "path": "../core" }],
913
"include": ["src/**/*.ts"]

0 commit comments

Comments
 (0)