Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Meta
create-react-app
Commits
270b1dc5
Commit
270b1dc5
authored
7 years ago
by
Erik J. Sturcke
Committed by
Dan Abramov
7 years ago
Browse files
Options
Download
Email Patches
Plain Diff
Strip hash from chunk file name (#3049)
parent
1df16109
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
packages/react-dev-utils/FileSizeReporter.js
+4
-1
packages/react-dev-utils/FileSizeReporter.js
with
4 additions
and
1 deletion
+4
-1
packages/react-dev-utils/FileSizeReporter.js
+
4
-
1
View file @
270b1dc5
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment