Commit 270b1dc5 authored by Erik J. Sturcke's avatar Erik J. Sturcke Committed by Dan Abramov
Browse files

Strip hash from chunk file name (#3049)

parent 1df16109
Showing with 4 additions and 1 deletion
+4 -1
...@@ -92,7 +92,10 @@ function printFileSizesAfterBuild( ...@@ -92,7 +92,10 @@ function printFileSizesAfterBuild(
function removeFileNameHash(buildFolder, fileName) { function removeFileNameHash(buildFolder, fileName) {
return fileName return fileName
.replace(buildFolder, '') .replace(buildFolder, '')
.replace(/\/?(.*)(\.\w+)(\.js|\.css)/, (match, p1, p2, p3) => p1 + p3); .replace(
/\/?(.*)(\.[0-9a-f]+)(\.chunk)?(\.js|\.css)/,
(match, p1, p2, p3, p4) => p1 + p4
);
} }
// Input: 1024, 2048 // Input: 1024, 2048
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment