@@ -158,18 +158,16 @@ function processStable(buildDir) {
158
158
}
159
159
160
160
if ( fs . existsSync ( buildDir + '/facebook-www' ) ) {
161
- const hash = crypto . createHash ( 'sha1' ) ;
162
161
for ( const fileName of fs . readdirSync ( buildDir + '/facebook-www' ) . sort ( ) ) {
163
162
const filePath = buildDir + '/facebook-www/' + fileName ;
164
163
const stats = fs . statSync ( filePath ) ;
165
164
if ( ! stats . isDirectory ( ) ) {
166
- hash . update ( fs . readFileSync ( filePath ) ) ;
167
165
fs . renameSync ( filePath , filePath . replace ( '.js' , '.classic.js' ) ) ;
168
166
}
169
167
}
170
168
updatePlaceholderReactVersionInCompiledArtifacts (
171
169
buildDir + '/facebook-www' ,
172
- ReactVersion + '-www-classic-' + hash . digest ( 'hex' ) . slice ( 0 , 8 )
170
+ ReactVersion + '-www-classic-%FILEHASH%'
173
171
) ;
174
172
}
175
173
@@ -224,18 +222,16 @@ function processExperimental(buildDir, version) {
224
222
}
225
223
226
224
if ( fs . existsSync ( buildDir + '/facebook-www' ) ) {
227
- const hash = crypto . createHash ( 'sha1' ) ;
228
225
for ( const fileName of fs . readdirSync ( buildDir + '/facebook-www' ) . sort ( ) ) {
229
226
const filePath = buildDir + '/facebook-www/' + fileName ;
230
227
const stats = fs . statSync ( filePath ) ;
231
228
if ( ! stats . isDirectory ( ) ) {
232
- hash . update ( fs . readFileSync ( filePath ) ) ;
233
229
fs . renameSync ( filePath , filePath . replace ( '.js' , '.modern.js' ) ) ;
234
230
}
235
231
}
236
232
updatePlaceholderReactVersionInCompiledArtifacts (
237
233
buildDir + '/facebook-www' ,
238
- ReactVersion + '-www-modern-' + hash . digest ( 'hex' ) . slice ( 0 , 8 )
234
+ ReactVersion + '-www-modern-%FILEHASH%'
239
235
) ;
240
236
}
241
237
0 commit comments