From 09c42fd886f1a35f7cd8f400711cd889876828ad Mon Sep 17 00:00:00 2001 From: pooya parsa Date: Wed, 14 Sep 2022 17:59:56 +0200 Subject: [PATCH] fix(vite): disable server warmup with `vite-node` (#7512) --- packages/vite/src/vite.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/vite/src/vite.ts b/packages/vite/src/vite.ts index caf96d0061..ff2e969d55 100644 --- a/packages/vite/src/vite.ts +++ b/packages/vite/src/vite.ts @@ -112,7 +112,11 @@ export async function bundle (nuxt: Nuxt) { } }) - if (nuxt.options.vite.warmupEntry !== false) { + if ( + nuxt.options.vite.warmupEntry !== false && + // https://github.com/nuxt/framework/issues/7510 + !(env.isServer && ctx.nuxt.options.vite.devBundler !== 'legacy') + ) { const start = Date.now() warmupViteServer(server, [join('/@fs/', ctx.entry)], env.isServer) .then(() => logger.info(`Vite ${env.isClient ? 'client' : 'server'} warmed up in ${Date.now() - start}ms`))