Skip to content

Commit

Permalink
fix(vitest): disable optimizer by default until it's stable (#5156)
Browse files Browse the repository at this point in the history
  • Loading branch information
sheremet-va authored Feb 12, 2024
1 parent 1304fed commit e1bd8d5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/config/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ You will not be able to edit your `node_modules` code for debugging, since the c
#### deps.optimizer.{mode}.enabled

- **Type:** `boolean`
- **Default:** `true` if using >= Vite 4.3.2, `false` otherwise
- **Default:** `false` since Vitest 1.3.0

Enable dependency optimization.

Expand Down
2 changes: 1 addition & 1 deletion packages/vitest/src/node/plugins/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export function resolveOptimizerConfig(_testOptions: DepsOptimizationOptions | u
console.warn(`Vitest: "deps.optimizer" is only available in Vite >= 4.3.2, current Vite version: ${viteVersion}`)
else
// enable by default
testOptions.enabled ??= true
testOptions.enabled ??= false
if (!allowed || testOptions?.enabled !== true) {
newConfig.cacheDir = undefined
newConfig.optimizeDeps = {
Expand Down

0 comments on commit e1bd8d5

Please sign in to comment.