Fix Vite race condition (#1674)
This commit is contained in:
parent
62684dbe4b
commit
8c4720db3a
1 changed files with 2 additions and 1 deletions
|
@ -66472,13 +66472,14 @@ async function instantiateModule(url, server, context = { global }, urlStack = [
|
|||
if (pendingDeps.length === 1) {
|
||||
pendingImports.set(url, pendingDeps);
|
||||
}
|
||||
await ssrLoadModule(dep, server, context, urlStack);
|
||||
let val = await ssrLoadModule(dep, server, context, urlStack);
|
||||
if (pendingDeps.length === 1) {
|
||||
pendingImports.delete(url);
|
||||
}
|
||||
else {
|
||||
pendingDeps.splice(pendingDeps.indexOf(dep), 1);
|
||||
}
|
||||
return val;
|
||||
}
|
||||
return (_b = moduleGraph.urlToModuleMap.get(dep)) === null || _b === void 0 ? void 0 : _b.ssrModule;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue