Skip to content

Commit

Permalink
fix: more stable hash calculation for depsOptimize (#15337)
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Dec 13, 2023
1 parent c902545 commit 2b39fe6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/vite/src/node/optimizer/index.ts
Expand Up @@ -1216,8 +1216,12 @@ export function getDepHash(config: ResolvedConfig, ssr: boolean): string {
assetsInclude: config.assetsInclude,
plugins: config.plugins.map((p) => p.name),
optimizeDeps: {
include: optimizeDeps?.include,
exclude: optimizeDeps?.exclude,
include: optimizeDeps?.include
? Array.from(new Set(optimizeDeps.include)).sort()
: undefined,
exclude: optimizeDeps?.exclude
? Array.from(new Set(optimizeDeps.exclude)).sort()
: undefined,
esbuildOptions: {
...optimizeDeps?.esbuildOptions,
plugins: optimizeDeps?.esbuildOptions?.plugins?.map((p) => p.name),
Expand Down

0 comments on commit 2b39fe6

Please sign in to comment.