Skip to content

Commit

Permalink
fix: handle ssrLoadModule failures. closes vitejs#2252
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris committed Feb 25, 2021
1 parent 1b082f1 commit faea2c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vite/src/node/ssr/ssrModuleLoader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export async function ssrLoadModule(

const modulePromise = instantiateModule(url, server, context, urlStack)
pendingModules.set(url, modulePromise)
modulePromise.then(() => pendingModules.delete(url))
modulePromise.catch(() => {}).then(() => pendingModules.delete(url))
return modulePromise
}

Expand Down

0 comments on commit faea2c4

Please sign in to comment.