Skip to content

Commit

Permalink
fix(vitrify): await app.ready in fastify development mode
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanvanherwijnen committed Aug 31, 2023
1 parent 6ded73a commit 6b56a09
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/hip-meals-warn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'vitrify': patch
---

fix(vitrify): await app.ready in fastify development mode
3 changes: 2 additions & 1 deletion packages/vitrify/src/node/bin/dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,8 @@ export async function createServer({

if (ssr === 'fastify') {
vite.fastifyRestart = async function () {
if (vite && app && (await app.ready())) {
if (vite && app) {
await app.ready()
await app.close()
;({ app, server } = await createServer({
ssr: 'fastify',
Expand Down

0 comments on commit 6b56a09

Please sign in to comment.