Monorepo Projects in Vitest
From the Vitest cheat sheet ยท Test Projects ยท verified Nov 2026
Monorepo Projects
Point Vitest at every package in a monorepo and configure each with defineProject
typescript
// vitest.config.ts at the repo root
export default defineConfig({
test: {
projects: ['packages/*'],
},
})๐ก Use defineProject in package configs for project-safe typing
๐ Referenced config files don't inherit the root config
๐ process.cwd() stays at the root even inside a project
โก test.projects replaced the old vitest.workspace file (3.2+)
projectsmonorepodefineProject
Continue with Vitest
Save the full cheat sheet or work through every related task.