diff --git a/packages/react-dom/src/ReactDOMSharedInternals.js b/packages/react-dom/src/ReactDOMSharedInternals.js index b9b1c07b8361c..50f19f563c9ad 100644 --- a/packages/react-dom/src/ReactDOMSharedInternals.js +++ b/packages/react-dom/src/ReactDOMSharedInternals.js @@ -47,8 +47,4 @@ const Internals: ReactDOMInternals = { usingClientEntryPoint: false, }; -// if (__DEV__) { -// (Internals: any).usingClientEntryPoint = false; -// } - export default Internals; diff --git a/scripts/rollup/packaging.js b/scripts/rollup/packaging.js index 64b1cf1735b7d..0c7123fae6d13 100644 --- a/scripts/rollup/packaging.js +++ b/scripts/rollup/packaging.js @@ -213,6 +213,18 @@ function filterOutEntrypoints(name) { hasBundle = entryPointsToHasBundle.get(entry + '.node') || entryPointsToHasBundle.get(entry + '.browser'); + + // The .react-server and .rsc suffixes may not have a bundle representation but + // should infer their bundle status from the non-suffixed entry point. + if (entry.endsWith('.react-server')) { + hasBundle = entryPointsToHasBundle.get( + entry.slice(0, '.react-server'.length * -1) + ); + } else if (entry.endsWith('.rsc')) { + hasBundle = entryPointsToHasBundle.get( + entry.slice(0, '.rsc'.length * -1) + ); + } } if (hasBundle === undefined) { // This doesn't exist in the bundles. It's an extra file.