Defines the root Vitest configuration for the workspace. Merges the base root configuration with any provided user configuration.
import { defineProjectOrRoot } from "./defineProjectOrRoot";// Example with default configurationdefineProjectOrRoot();// Example with user configuration overridesdefineProjectOrRoot({ test: { dir: "packages", },});// Example with multiple user configuration overridesdefineProjectOrRoot( { test: { dir: "packages", coverage: { thresholds: { "100": true, }, }, }, }, { test: { dir: "libs", }, },); Copy
import { defineProjectOrRoot } from "./defineProjectOrRoot";// Example with default configurationdefineProjectOrRoot();// Example with user configuration overridesdefineProjectOrRoot({ test: { dir: "packages", },});// Example with multiple user configuration overridesdefineProjectOrRoot( { test: { dir: "packages", coverage: { thresholds: { "100": true, }, }, }, }, { test: { dir: "libs", }, },);
Optional user-provided Vitest configuration overrides
The merged root Vitest configuration
Defines the root Vitest configuration for the workspace. Merges the base root configuration with any provided user configuration.
Example