mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 05:35:13 +00:00
fix(vite): use ssr result if it exists (#26356)
This commit is contained in:
parent
c49d206647
commit
dfe31aa143
@ -63,7 +63,7 @@ export async function warmupViteServer (
|
||||
|
||||
try {
|
||||
const mod = await server.moduleGraph.getModuleByUrl(url, isServer)
|
||||
const deps = mod?.ssrTransformResult?.deps /* server */ || mod?.importedModules.size ? Array.from(mod?.importedModules /* client */).map(m => m.url) : []
|
||||
const deps = mod?.ssrTransformResult?.deps /* server */ || (mod?.importedModules.size ? Array.from(mod?.importedModules /* client */).map(m => m.url) : [])
|
||||
await Promise.all(deps.map(m => warmup(m)))
|
||||
} catch (e) {
|
||||
logger.debug('[warmup] tracking dependencies for %s failed with: %s', url, e)
|
||||
|
Loading…
Reference in New Issue
Block a user