fix(vite): disable optimizeDeps in ssr (#27356)

This commit is contained in:
Anthony Fu 2024-05-26 16:46:42 +02:00 committed by GitHub
parent 440f92e832
commit 2f932698c3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -51,7 +51,7 @@ export async function buildServer (ctx: ViteBuildContext) {
'XMLHttpRequest': 'undefined', 'XMLHttpRequest': 'undefined',
}, },
optimizeDeps: { optimizeDeps: {
entries: ctx.nuxt.options.ssr ? [ctx.entry] : [], noDiscovery: true,
}, },
resolve: { resolve: {
alias: { alias: {