fix(vite): write dev manifest before spa build (#7380)

This commit is contained in:
Daniel Roe 2022-09-09 11:28:07 +01:00 committed by GitHub
parent e05f8ee126
commit 0ab29f6f2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -168,14 +168,14 @@ export async function buildServer (ctx: ViteBuildContext) {
return return
} }
// Write dev client manifest
await writeManifest(ctx)
if (!ctx.nuxt.options.ssr) { if (!ctx.nuxt.options.ssr) {
await onBuild() await onBuild()
return return
} }
// Write dev client manifest
await writeManifest(ctx)
// Start development server // Start development server
const viteServer = await vite.createServer(serverConfig) const viteServer = await vite.createServer(serverConfig)
ctx.ssrServer = viteServer ctx.ssrServer = viteServer