Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions src/utils/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,15 @@ export async function* buildAndImportApp(
})

await context.watch()
if (!options.watch) {
await context.dispose()
}

do {
yield await appPromise!
const app = await appPromise!
if (!options.watch) {
// `context.dispose()` must be called after first build result to avoid race condition
// https://github.com/honojs/cli/issues/66
await context.dispose()
}
yield app
preparePromise()
} while (options.watch)
}