mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-18 09:25:54 +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: {
|
build: {
|
||||||
outDir: resolve(ctx.nuxt.options.buildDir, 'dist/server'),
|
outDir: resolve(ctx.nuxt.options.buildDir, 'dist/server'),
|
||||||
ssr: true,
|
ssr: ctx.nuxt.options.ssr ?? true,
|
||||||
rollupOptions: {
|
rollupOptions: {
|
||||||
output: {
|
output: {
|
||||||
entryFileNames: 'server.mjs',
|
entryFileNames: 'server.mjs',
|
||||||
|
@ -107,7 +107,5 @@ export async function bundle (nuxt: Nuxt) {
|
|||||||
})
|
})
|
||||||
|
|
||||||
await buildClient(ctx)
|
await buildClient(ctx)
|
||||||
if (ctx.nuxt.options.ssr) {
|
|
||||||
await buildServer(ctx)
|
await buildServer(ctx)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user