diff --git a/scripts/rollup/build-all-release-channels.js b/scripts/rollup/build-all-release-channels.js index a365faa7e9323..098177baf9a86 100644 --- a/scripts/rollup/build-all-release-channels.js +++ b/scripts/rollup/build-all-release-channels.js @@ -158,18 +158,16 @@ function processStable(buildDir) { } if (fs.existsSync(buildDir + '/facebook-www')) { - const hash = crypto.createHash('sha1'); for (const fileName of fs.readdirSync(buildDir + '/facebook-www').sort()) { const filePath = buildDir + '/facebook-www/' + fileName; const stats = fs.statSync(filePath); if (!stats.isDirectory()) { - hash.update(fs.readFileSync(filePath)); fs.renameSync(filePath, filePath.replace('.js', '.classic.js')); } } updatePlaceholderReactVersionInCompiledArtifacts( buildDir + '/facebook-www', - ReactVersion + '-www-classic-' + hash.digest('hex').slice(0, 8) + ReactVersion + '-www-classic-%FILEHASH%' ); } @@ -224,18 +222,16 @@ function processExperimental(buildDir, version) { } if (fs.existsSync(buildDir + '/facebook-www')) { - const hash = crypto.createHash('sha1'); for (const fileName of fs.readdirSync(buildDir + '/facebook-www').sort()) { const filePath = buildDir + '/facebook-www/' + fileName; const stats = fs.statSync(filePath); if (!stats.isDirectory()) { - hash.update(fs.readFileSync(filePath)); fs.renameSync(filePath, filePath.replace('.js', '.modern.js')); } } updatePlaceholderReactVersionInCompiledArtifacts( buildDir + '/facebook-www', - ReactVersion + '-www-modern-' + hash.digest('hex').slice(0, 8) + ReactVersion + '-www-modern-%FILEHASH%' ); }