Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

Commit

Permalink
fix(vite): build fails with ssr turned off (#2652)
Browse files Browse the repository at this point in the history
  • Loading branch information
blazmrak authored and danielroe committed Jan 13, 2022
1 parent 2c0c626 commit 232f67c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/vite/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,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',
Expand Down
4 changes: 1 addition & 3 deletions packages/vite/src/vite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,5 @@ export async function bundle (nuxt: Nuxt) {
})

await buildClient(ctx)
if (ctx.nuxt.options.ssr) {
await buildServer(ctx)
}
await buildServer(ctx)
}

0 comments on commit 232f67c

Please sign in to comment.