From 9c2e2080903994fd230e90b965b28c7ce261fcae Mon Sep 17 00:00:00 2001 From: Anthony Fu Date: Thu, 31 Mar 2022 15:11:50 +0800 Subject: [PATCH] fix(vite-node): wrong entry been resolved in stub mode (#3983) --- packages/vite/src/runtime/server.mjs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/vite/src/runtime/server.mjs b/packages/vite/src/runtime/server.mjs index cdaccbc983..83b7c956e6 100644 --- a/packages/vite/src/runtime/server.mjs +++ b/packages/vite/src/runtime/server.mjs @@ -50,6 +50,9 @@ async function writeManifest () { let render export default async (ssrContext) => { + // Workaround for stub mode + // https://github.com/nuxt/framework/pull/3983 + process.server = true render = render || (await runner.executeFile(entry)).default const result = await render(ssrContext) await writeManifest()