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
  • Loading branch information
sheremet-va authored and LorenzoBloedow committed Dec 19, 2023
1 parent 7be076c commit ceb6de4
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 ceb6de4

Please sign in to comment.