We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
context.dispose()
1 parent 68a9090 commit 2758fb0Copy full SHA for 2758fb0
1 file changed
src/utils/build.ts
@@ -79,12 +79,15 @@ export async function* buildAndImportApp(
79
})
80
81
await context.watch()
82
- if (!options.watch) {
83
- await context.dispose()
84
- }
85
86
do {
87
- 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
88
+ await context.dispose()
89
+ }
90
+ yield app
91
preparePromise()
92
} while (options.watch)
93
}
0 commit comments