@@ -158,18 +158,16 @@ function processStable(buildDir) {
158158 }
159159
160160 if ( fs . existsSync ( buildDir + '/facebook-www' ) ) {
161- const hash = crypto . createHash ( 'sha1' ) ;
162161 for ( const fileName of fs . readdirSync ( buildDir + '/facebook-www' ) . sort ( ) ) {
163162 const filePath = buildDir + '/facebook-www/' + fileName ;
164163 const stats = fs . statSync ( filePath ) ;
165164 if ( ! stats . isDirectory ( ) ) {
166- hash . update ( fs . readFileSync ( filePath ) ) ;
167165 fs . renameSync ( filePath , filePath . replace ( '.js' , '.classic.js' ) ) ;
168166 }
169167 }
170168 updatePlaceholderReactVersionInCompiledArtifacts (
171169 buildDir + '/facebook-www' ,
172- ReactVersion + '-www-classic-' + hash . digest ( 'hex' ) . slice ( 0 , 8 )
170+ ReactVersion + '-www-classic-%FILEHASH%'
173171 ) ;
174172 }
175173
@@ -224,18 +222,16 @@ function processExperimental(buildDir, version) {
224222 }
225223
226224 if ( fs . existsSync ( buildDir + '/facebook-www' ) ) {
227- const hash = crypto . createHash ( 'sha1' ) ;
228225 for ( const fileName of fs . readdirSync ( buildDir + '/facebook-www' ) . sort ( ) ) {
229226 const filePath = buildDir + '/facebook-www/' + fileName ;
230227 const stats = fs . statSync ( filePath ) ;
231228 if ( ! stats . isDirectory ( ) ) {
232- hash . update ( fs . readFileSync ( filePath ) ) ;
233229 fs . renameSync ( filePath , filePath . replace ( '.js' , '.modern.js' ) ) ;
234230 }
235231 }
236232 updatePlaceholderReactVersionInCompiledArtifacts (
237233 buildDir + '/facebook-www' ,
238- ReactVersion + '-www-modern-' + hash . digest ( 'hex' ) . slice ( 0 , 8 )
234+ ReactVersion + '-www-modern-%FILEHASH%'
239235 ) ;
240236 }
241237
0 commit comments