Skip to content

Commit a2175c7

Browse files
authored
docs: clarify that workspace can be used to specify several configs (#6854)
1 parent 68be7b1 commit a2175c7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/guide/workspace.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ title: Workspace | Guide
1010

1111
:::
1212

13-
Vitest provides built-in support for monorepos through a workspace configuration file. You can create a workspace to define your project's setups.
13+
Vitest provides a way to define multiple project configurations within a single Vitest process. This feature is particularly useful for monorepo setups but can also be used to run tests with different configurations, such as `resolve.alias`, `plugins`, or `test.browser` and more.
1414

1515
## Defining a Workspace
1616

17-
A workspace must include a `vitest.workspace` or `vitest.projects` file in its root directory (located in the same folder as your root configuration file, if applicable). Vitest supports `ts`, `js`, and `json` extensions for this file.
17+
A workspace must include a `vitest.workspace` or `vitest.projects` file in its root directory (located in the same folder as your root configuration file or working directory if it doesn't exist). Vitest supports `ts`, `js`, and `json` extensions for this file.
1818

1919
::: tip NAMING
2020
Please note that this feature is named `workspace`, not `workspaces` (without an "s" at the end).
@@ -80,7 +80,7 @@ export default defineWorkspace([
8080
:::
8181

8282
::: warning
83-
All projects must have unique names; otherwise, Vitest will throw an error. If a name is not provided in the inline configuration, Vitest will assign a number. For project configurations defined with glob syntax, Vitest will default to using the "name" property in the nearest `package.json` file or the folder name if no such file exists.
83+
All projects must have unique names; otherwise, Vitest will throw an error. If a name is not provided in the inline configuration, Vitest will assign a number. For project configurations defined with glob syntax, Vitest will default to using the "name" property in the nearest `package.json` file or, if none exists, the folder name.
8484
:::
8585

8686
If you do not use inline configurations, you can create a small JSON file in your root directory:

0 commit comments

Comments
 (0)