From 2f932698c37ca79e47a75949b162be5281cf51fc Mon Sep 17 00:00:00 2001 From: Anthony Fu Date: Sun, 26 May 2024 16:46:42 +0200 Subject: [PATCH] fix(vite): disable `optimizeDeps` in ssr (#27356) --- packages/vite/src/server.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/vite/src/server.ts b/packages/vite/src/server.ts index 7c998c3dbd..33965931a8 100644 --- a/packages/vite/src/server.ts +++ b/packages/vite/src/server.ts @@ -51,7 +51,7 @@ export async function buildServer (ctx: ViteBuildContext) { 'XMLHttpRequest': 'undefined', }, optimizeDeps: { - entries: ctx.nuxt.options.ssr ? [ctx.entry] : [], + noDiscovery: true, }, resolve: { alias: {