mirror of
https://github.com/vuejs/vue-cli.git
synced 2026-04-22 20:38:55 -05:00
@@ -72,6 +72,18 @@ module.exports = (api, options) => {
|
||||
// matter anyway
|
||||
chunksSortMode: 'none'
|
||||
})
|
||||
|
||||
// keep chunk ids stable so async chunks have consistent hash (#1916)
|
||||
webpackConfig
|
||||
.plugin('named-chunks')
|
||||
.use(require('webpack/lib/NamedChunksPlugin'), [chunk => {
|
||||
if (chunk.name) {
|
||||
return chunk.name
|
||||
}
|
||||
return `chunk-` + Array.from(chunk.modulesIterable, m => {
|
||||
return m.id
|
||||
}).join('_')
|
||||
}])
|
||||
}
|
||||
|
||||
// resolve HTML file(s)
|
||||
|
||||
@@ -19,7 +19,9 @@ module.exports = (api, options) => {
|
||||
// keep module.id stable when vendor modules does not change
|
||||
webpackConfig
|
||||
.plugin('hash-module-ids')
|
||||
.use(require('webpack/lib/HashedModuleIdsPlugin'))
|
||||
.use(require('webpack/lib/HashedModuleIdsPlugin'), [{
|
||||
hashDigest: 'hex'
|
||||
}])
|
||||
|
||||
// disable optimization during tests to speed things up
|
||||
if (process.env.VUE_CLI_TEST) {
|
||||
|
||||
Reference in New Issue
Block a user