Skip to content

Commit f4a7e43

Browse files
authored
refactor: vitetest config (#1107)
1 parent e6938a0 commit f4a7e43

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import { defineConfig } from "vitest/config";
2+
3+
export default defineConfig({
4+
test: {
5+
/**
6+
* Explicitly set root to current directory for this package.
7+
*
8+
* In monorepo setups, this vitest.config.ts takes priority over any parent
9+
* vite.config.js files, preventing Vitest from using unrelated configurations
10+
* from parent directories that may reference dependencies not installed in
11+
* this package.
12+
*
13+
* This is the recommended approach for monorepo packages to ensure isolated
14+
* test configuration.
15+
*
16+
* See: https://vitest.dev/config/
17+
*/
18+
root: ".",
19+
},
20+
});

0 commit comments

Comments
 (0)