Skip to content

Commit 1f11e47

Browse files
committed
fix: incorrect optimizer file hash
1 parent ac75780 commit 1f11e47

File tree

1 file changed

+2
-2
lines changed
  • packages/vite/src/node/optimizer

1 file changed

+2
-2
lines changed

packages/vite/src/node/optimizer/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -626,10 +626,10 @@ export function runOptimizeDeps(
626626
id,
627627
file,
628628
...info,
629-
// We only need to hash the output.imports in to check for stability, but adding the hash
629+
// We only need to hash the chunk.imports in to check for stability, but adding the hash
630630
// and file path gives us a unique hash that may be useful for other things in the future
631631
fileHash: getHash(
632-
metadata.hash + file + JSON.stringify(chunk.modules),
632+
metadata.hash + file + JSON.stringify(chunk.imports),
633633
),
634634
browserHash: metadata.browserHash,
635635
// After bundling we have more information and can warn the user about legacy packages

0 commit comments

Comments
 (0)