New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Combined two if statements that do the same things in many places in the ReactFreshRuntime.js
file
#28757
base: main
Are you sure you want to change the base?
Conversation
Note: I had to make this pull request again because I had not signed the license before. |
Comparing: 2acfb7b...8279cbf Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: Expand to show
|
I'm looking through the file, and this redundant behavior that @WellHiIGuess is attempting to remove is present in many places, maybe implementing this throughout the file might be helpful? It could also reduce the bundle size? |
You're right I'll make a commit to remove all of these |
ReactFreshRuntime.js
file
01f8b8b
to
c386e27
Compare
2677202
to
925930d
Compare
Summary
Combined an if statement in the
performReactRefresh
function, because they both did the same thing.For example:
to:
This simplifies the code.
How did you test this change?
Both of these if statements
return null;
. Combining them and adding an||
does the same thing.