diff --git a/lib/runtime/RefreshUtils.js b/lib/runtime/RefreshUtils.js index 98807575..d89b5cfc 100644 --- a/lib/runtime/RefreshUtils.js +++ b/lib/runtime/RefreshUtils.js @@ -55,6 +55,10 @@ function getReactRefreshBoundarySignature(moduleExports) { continue; } + if (key !== 'default' && key[0] != key[0].toUpperCase()) { + continue; + } + signature.push(key); signature.push(Refresh.getFamilyByType(moduleExports[key])); } @@ -117,6 +121,11 @@ function isReactRefreshBoundary(moduleExports) { continue; } + if (key !== 'default' && 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. @@ -155,6 +164,10 @@ function registerExportsForReactRefresh(moduleExports, moduleId) { continue; } + if (key !== 'default' && key[0] != key[0].toUpperCase()) { + continue; + } + var exportValue = moduleExports[key]; if (Refresh.isLikelyComponentType(exportValue)) { var typeID = moduleId + ' %exports% ' + key;