Skip to content

Commit 69cec80

Browse files
committed
fix: hash module ids in anonymous chunks, avoid ENAMETOOLONG error
closes #2490
1 parent f720ff8 commit 69cec80

File tree

1 file changed

+6
-3
lines changed
  • packages/@vue/cli-service/lib/config

1 file changed

+6
-3
lines changed

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,12 @@ module.exports = (api, options) => {
125125
if (chunk.name) {
126126
return chunk.name
127127
}
128-
return `chunk-` + Array.from(chunk.modulesIterable, m => {
129-
return m.id
130-
}).join('_')
128+
129+
const hash = require('hash-sum')
130+
const joinedHash = hash(
131+
Array.from(chunk.modulesIterable, m => m.id).join('_')
132+
)
133+
return `chunk-` + joinedHash
131134
}])
132135
}
133136

0 commit comments

Comments
 (0)