mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-25 23:22:02 +00:00
fix(vite): pass ssr condition to getModuleByUrl
(#7260)
This commit is contained in:
parent
497972be5d
commit
d115b01a35
@ -18,7 +18,7 @@ export async function warmupViteServer (
|
|||||||
} catch (e) {
|
} catch (e) {
|
||||||
logger.debug('Warmup for %s failed with: %s', url, 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 || [])
|
const deps = Array.from(mod?.importedModules || [])
|
||||||
await Promise.all(deps.map(m => warmup(m.url.replace('/@id/__x00__', '\0'))))
|
await Promise.all(deps.map(m => warmup(m.url.replace('/@id/__x00__', '\0'))))
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user