File tree Expand file tree Collapse file tree 1 file changed +3
-13
lines changed
packages/@vue/cli-service/lib/config Expand file tree Collapse file tree 1 file changed +3
-13
lines changed Original file line number Diff line number Diff line change @@ -119,25 +119,15 @@ module.exports = (api, options) => {
119119 } )
120120
121121 // keep chunk ids stable so async chunks have consistent hash (#1916)
122- const seen = new Set ( )
123- const nameLength = 4
124122 webpackConfig
125123 . plugin ( 'named-chunks' )
126124 . use ( require ( 'webpack/lib/NamedChunksPlugin' ) , [ chunk => {
127125 if ( chunk . name ) {
128126 return chunk . name
129127 }
130- const modules = Array . from ( chunk . modulesIterable )
131- if ( modules . length > 1 ) {
132- const hash = require ( 'hash-sum' )
133- const joinedHash = hash ( modules . map ( m => m . id ) . join ( '_' ) )
134- let len = nameLength
135- while ( seen . has ( joinedHash . substr ( 0 , len ) ) ) len ++
136- seen . add ( joinedHash . substr ( 0 , len ) )
137- return `chunk-${ joinedHash . substr ( 0 , len ) } `
138- } else {
139- return modules [ 0 ] . id
140- }
128+ return `chunk-` + Array . from ( chunk . modulesIterable , m => {
129+ return m . id
130+ } ) . join ( '_' )
141131 } ] )
142132 }
143133
You can’t perform that action at this time.
0 commit comments