You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 1b2380c
Browse filesBrowse the repository at this point in the historyBrowse files
The location of the cache is a single, workspace-wide directory. See [`fsModuleCachePath`](/config/fsmodulecachepath) to move it.
28
28
:::
29
29
30
+
## Manifest {#manifest}
31
+
32
+
After every test run, each project writes a `_manifest-<project>-<hash>.json` file into the cache directory, next to the cached modules. `<project>` is the [project name](/config/name), or the name of the project's root folder if the project has no name. The manifest is grouped by Vite environment. `modules` maps the URL of every cached module to the name of its cache file in that directory. `externalized` maps the URL of every [externalized](/config/server#server-deps-external) dependency to the file that Node imports without a transform:
The manifest keeps the entries from previous runs, so a run that imports only some files does not remove the others.
53
+
54
+
A cache file contains the code that Vitest runs, so you can edit it to debug a transform. Vitest runs the edited code until the module is transformed again: when the source file or the configuration changes, or when the cache is cleared with [`--clearCache`](/guide/cli#clearcache). Keep the `//# vitestCache=` comment at the end of the file, otherwise Vitest transforms the module again.
55
+
30
56
## Known Issues
31
57
32
58
Vitest creates a persistent file hash based on file content, its id, Vite's environment configuration and coverage status. Vitest tries to use as much information as it has about the configuration, but it is still incomplete. At the moment, it is not possible to track your plugin options because there is no standard interface for it.
Copy file name to clipboardExpand all lines: docs/config/server.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ outline: deep
7
7
8
8
Before Vitest 4, this option was used to define the configuration for the `vite-node` server.
9
9
10
-
At the moment, this option allows you to configure the inlining and externalization mechanisms, along with the module runner debugging configuration.
10
+
At the moment, this option allows you to configure the inlining and externalization mechanisms.
11
11
12
12
::: warning
13
13
These options should be used only as the last resort to improve performance by externalizing auto-inlined dependencies or to fix issues by inlining invalid external dependencies.
@@ -71,3 +71,7 @@ If a `RegExp` is provided, it is matched against the full file path.
71
71
When enabled, Vitest will try to guess a CommonJS build for an ESM entry by checking a few common CJS/UMD file name and folder patterns (like `.mjs`, `.umd.js`, `.cjs.js`, `umd/`, `cjs/`, `lib/`).
72
72
73
73
This is a best-effort heuristic to work around confusing or incorrect ESM/CJS packaging and may not work for all dependencies.
74
+
75
+
## server.debug <Deprecated />
76
+
77
+
This option has no effect. To inspect or edit the code that Vitest runs, look up the module in the [`fsModuleCache` manifest](/config/fsmodulecache#manifest).
'`server.debug` is deprecated and has no effect. To inspect or edit the transformed code, look up the module in the `fsModuleCache` manifest: https://vitest.dev/config/fsmodulecache#manifest',
0 commit comments