Skip to content

Commit

Permalink
Fix Vite race condition (#1674)
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewp authored Oct 27, 2021
1 parent 62684db commit 8c4720d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/astro/vendor/vite/dist/node/chunks/dep-35df7f96.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
Expand Down

0 comments on commit 8c4720d

Please sign in to comment.