File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
packages/@vue/cli-service/lib/config Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -72,6 +72,18 @@ module.exports = (api, options) => {
72
72
// matter anyway
73
73
chunksSortMode : 'none'
74
74
} )
75
+
76
+ // keep chunk ids stable so async chunks have consistent hash (#1916)
77
+ webpackConfig
78
+ . plugin ( 'named-chunks' )
79
+ . use ( require ( 'webpack/lib/NamedChunksPlugin' ) , [ chunk => {
80
+ if ( chunk . name ) {
81
+ return chunk . name
82
+ }
83
+ return `chunk-` + Array . from ( chunk . modulesIterable , m => {
84
+ return m . id
85
+ } ) . join ( '_' )
86
+ } ] )
75
87
}
76
88
77
89
// resolve HTML file(s)
Original file line number Diff line number Diff line change @@ -19,7 +19,9 @@ module.exports = (api, options) => {
19
19
// keep module.id stable when vendor modules does not change
20
20
webpackConfig
21
21
. plugin ( 'hash-module-ids' )
22
- . use ( require ( 'webpack/lib/HashedModuleIdsPlugin' ) )
22
+ . use ( require ( 'webpack/lib/HashedModuleIdsPlugin' ) , [ {
23
+ hashDigest : 'hex'
24
+ } ] )
23
25
24
26
// disable optimization during tests to speed things up
25
27
if ( process . env . VUE_CLI_TEST ) {
You can’t perform that action at this time.
0 commit comments