From d115b01a35b5a582964796f30fcab514b97eedd5 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Mon, 5 Sep 2022 21:52:14 +0100 Subject: [PATCH] fix(vite): pass ssr condition to `getModuleByUrl` (#7260) --- packages/vite/src/utils/warmup.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/vite/src/utils/warmup.ts b/packages/vite/src/utils/warmup.ts index d7458e66ea9..6257debcb73 100644 --- a/packages/vite/src/utils/warmup.ts +++ b/packages/vite/src/utils/warmup.ts @@ -18,7 +18,7 @@ export async function warmupViteServer ( } catch (e) { logger.debug('Warmup for %s failed with: %s', url, e) } - const mod = await server.moduleGraph.getModuleByUrl(url) + const mod = await server.moduleGraph.getModuleByUrl(url, isServer) const deps = Array.from(mod?.importedModules || []) await Promise.all(deps.map(m => warmup(m.url.replace('/@id/__x00__', '\0')))) }