diff --git a/packages/react-server-dom-webpack/src/ReactFlightClientWebpackBundlerConfig.js b/packages/react-server-dom-webpack/src/ReactFlightClientWebpackBundlerConfig.js index 80f02f58b0efe..976f874444d29 100644 --- a/packages/react-server-dom-webpack/src/ReactFlightClientWebpackBundlerConfig.js +++ b/packages/react-server-dom-webpack/src/ReactFlightClientWebpackBundlerConfig.js @@ -58,6 +58,9 @@ export function resolveModuleReference( const chunkCache: Map> = new Map(); const asyncModuleCache: Map> = new Map(); +function ignoreReject() { + // We rely on rejected promises to be handled by another listener. +} // Start preloading the modules since we might need them soon. // This function doesn't suspend. export function preloadModule( @@ -72,7 +75,7 @@ export function preloadModule( const thenable = __webpack_chunk_load__(chunkId); promises.push(thenable); const resolve = chunkCache.set.bind(chunkCache, chunkId, null); - thenable.then(resolve); + thenable.then(resolve, ignoreReject); chunkCache.set(chunkId, thenable); } else if (entry !== null) { promises.push(entry);