Skip to content

Commit

Permalink
Upgrade react-server-dom-webpack
Browse files Browse the repository at this point in the history
  • Loading branch information
timneutkens committed Sep 19, 2022
1 parent ffcc160 commit 80e8863
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 19 deletions.
Expand Up @@ -57,9 +57,13 @@ function resolveModuleReference(bundlerConfig, moduleData) {
// replicate it in user space. null means that it has already loaded.

var chunkCache = new Map();
var asyncModuleCache = new Map(); // Start preloading the modules since we might need them soon.
var asyncModuleCache = 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.


function preloadModule(moduleData) {
var chunks = moduleData.chunks;
var promises = [];
Expand All @@ -73,9 +77,10 @@ function preloadModule(moduleData) {

promises.push(thenable);
var resolve = chunkCache.set.bind(chunkCache, chunkId, null);
var reject = chunkCache.set.bind(chunkCache, chunkId);
thenable.then(resolve, reject);
thenable.then(resolve, ignoreReject);
chunkCache.set(chunkId, thenable);
} else if (entry !== null) {
promises.push(entry);
}
}

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 80e8863

Please sign in to comment.