Skip to content

Commit

Permalink
fix: hash module ids in anonymous chunks, avoid ENAMETOOLONG error
Browse files Browse the repository at this point in the history
closes #2490
  • Loading branch information
haoqunjiang committed Sep 12, 2018
1 parent f720ff8 commit 69cec80
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions packages/@vue/cli-service/lib/config/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,12 @@ module.exports = (api, options) => {
if (chunk.name) {
return chunk.name
}
return `chunk-` + Array.from(chunk.modulesIterable, m => {
return m.id
}).join('_')

const hash = require('hash-sum')
const joinedHash = hash(
Array.from(chunk.modulesIterable, m => m.id).join('_')
)
return `chunk-` + joinedHash
}])
}

Expand Down

0 comments on commit 69cec80

Please sign in to comment.