Skip to content

Commit 4b5a634

Browse files
PanJiaChenyyx990803
authored andcommitted
fix: avoid hash collisions (#1959)
1 parent 1ce40cd commit 4b5a634

File tree

1 file changed

+1
-0
lines changed
  • packages/@vue/cli-service/lib/config

1 file changed

+1
-0
lines changed

packages/@vue/cli-service/lib/config/app.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ module.exports = (api, options) => {
103103
const joinedHash = hash(modules.map(m => m.id).join('_'))
104104
let len = nameLength
105105
while (seen.has(joinedHash.substr(0, len))) len++
106+
seen.add(joinedHash.substr(0, len))
106107
return `chunk-${joinedHash.substr(0, len)}`
107108
} else {
108109
return modules[0].id

0 commit comments

Comments
 (0)