Skip to content

Commit 9027af3

Browse files
authored
docs: clarify server.deps.fallbackCJS heuristic (#9479)
1 parent d589c82 commit 9027af3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

docs/config/server.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,6 @@ If a `RegExp` is provided, it is matched against the full file path.
6868
- **Type:** `boolean`
6969
- **Default:** `false`
7070

71-
When a dependency is a valid ESM package, try to guess the cjs version based on the path. This might be helpful, if a dependency has the wrong ESM file.
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/`).
7272

73-
This might potentially cause some misalignment if a package has different logic in ESM and CJS mode.
73+
This is a best-effort heuristic to work around confusing or incorrect ESM/CJS packaging and may not work for all dependencies.

0 commit comments

Comments
 (0)