mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-18 01:15:58 +00:00
fix(vite): build fails with ssr turned off (#2652)
This commit is contained in:
parent
baa0853afa
commit
e0fec80baf
@ -54,7 +54,7 @@ export async function buildServer (ctx: ViteBuildContext) {
|
||||
},
|
||||
build: {
|
||||
outDir: resolve(ctx.nuxt.options.buildDir, 'dist/server'),
|
||||
ssr: true,
|
||||
ssr: ctx.nuxt.options.ssr ?? true,
|
||||
rollupOptions: {
|
||||
output: {
|
||||
entryFileNames: 'server.mjs',
|
||||
|
@ -107,7 +107,5 @@ export async function bundle (nuxt: Nuxt) {
|
||||
})
|
||||
|
||||
await buildClient(ctx)
|
||||
if (ctx.nuxt.options.ssr) {
|
||||
await buildServer(ctx)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user