Skip to content

Commit

Permalink
remove eagerness of RefreshUtils to reduce circular dependency errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Lenz Weber committed Apr 20, 2022
1 parent b9adfd2 commit 5bab43b
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions lib/runtime/RefreshUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ function getReactRefreshBoundarySignature(moduleExports) {
continue;
}

if (key[0] != key[0].toUpperCase()) {
continue;
}

signature.push(key);
signature.push(Refresh.getFamilyByType(moduleExports[key]));
}
Expand Down Expand Up @@ -117,6 +121,11 @@ function isReactRefreshBoundary(moduleExports) {
continue;
}

if (key[0] != key[0].toUpperCase()) {
areAllExportsComponents = false;
continue;
}

// We can (and have to) safely execute getters here,
// as Webpack manually assigns harmony exports to getters,
// without any side-effects attached.
Expand Down Expand Up @@ -155,6 +164,10 @@ function registerExportsForReactRefresh(moduleExports, moduleId) {
continue;
}

if (key[0] != key[0].toUpperCase()) {
continue;
}

var exportValue = moduleExports[key];
if (Refresh.isLikelyComponentType(exportValue)) {
var typeID = moduleId + ' %exports% ' + key;
Expand Down

0 comments on commit 5bab43b

Please sign in to comment.