Skip to content

Commit

Permalink
fix(vitest): only override ssr.optimizer instead of the whole ssr obj…
Browse files Browse the repository at this point in the history
…ect (#4080)
  • Loading branch information
sheremet-va authored Sep 6, 2023
1 parent a84a8e0 commit 410bc45
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/vitest/src/node/plugins/optimizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@ export function VitestOptimizer(): Plugin {

viteConfig.cacheDir = webOptimizer.cacheDir || ssrOptimizer.cacheDir || viteConfig.cacheDir
viteConfig.optimizeDeps = webOptimizer.optimizeDeps
viteConfig.ssr = {
optimizeDeps: ssrOptimizer.optimizeDeps,
}
viteConfig.ssr ??= {}
viteConfig.ssr.optimizeDeps = ssrOptimizer.optimizeDeps
},
},
}
Expand Down

0 comments on commit 410bc45

Please sign in to comment.