Skip to content

Commit

Permalink
fix: use browserHash for imports from node_modules (#7278)
Browse files Browse the repository at this point in the history
  • Loading branch information
patak-dev committed Mar 11, 2022
1 parent d4ae45d commit 161f8ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vite/src/node/plugins/resolve.ts
Expand Up @@ -606,7 +606,7 @@ export function tryNodeResolve(
// otherwise we may introduce duplicated modules for externalized files
// from pre-bundled deps.

const versionHash = server._optimizeDepsMetadata?.hash
const versionHash = server._optimizeDepsMetadata?.browserHash
if (versionHash && isJsType) {
resolved = injectQuery(resolved, `v=${versionHash}`)
}
Expand Down

0 comments on commit 161f8ea

Please sign in to comment.