Skip to content

Commit 6a53028

Browse files
committed
Fixed Vitest VSCode extension not being able to run tests
1 parent ba644fa commit 6a53028

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

vite.config.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,30 @@ export default defineConfig({
1212
// its tsc step reads `core`'s `.d.ts` files.
1313
cache: { scripts: true },
1414
},
15+
// Workspace-level project list for tooling that discovers tests across the
16+
// monorepo (e.g. the Vitest VSCode extension). Replaces the old
17+
// `vitest.workspace.ts` — Vitest 4 dropped `defineWorkspace` in favour of
18+
// declaring projects here. Each entry points at the package's
19+
// `vite.config.ts`, which carries that package's own `test` block.
20+
test: {
21+
projects: [
22+
"./packages/ariakit/vite.config.ts",
23+
"./packages/code-block/vite.config.ts",
24+
"./packages/core/vite.config.ts",
25+
"./packages/mantine/vite.config.ts",
26+
"./packages/react/vite.config.ts",
27+
"./packages/server-util/vite.config.ts",
28+
"./packages/shadcn/vite.config.ts",
29+
"./packages/xl-ai/vite.config.ts",
30+
"./packages/xl-ai-server/vite.config.ts",
31+
"./packages/xl-docx-exporter/vite.config.ts",
32+
"./packages/xl-email-exporter/vite.config.ts",
33+
"./packages/xl-multi-column/vite.config.ts",
34+
"./packages/xl-odt-exporter/vite.config.ts",
35+
"./packages/xl-pdf-exporter/vite.config.ts",
36+
"./tests/vite.config.ts",
37+
],
38+
},
1539
lint: {
1640
plugins: ["typescript", "react", "import"],
1741
// Adds pre-migration ESLint rules with no oxlint equivalents.

0 commit comments

Comments
 (0)