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
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,13 @@ export async function* runEsBuildBuildAction(
// Output the first build results after setting up the watcher to ensure that any code executed
// higher in the iterator call stack will trigger the watcher. This is particularly relevant for
// unit tests which execute the builder and modify the file system programmatically.
yield* emitOutputResults(result, outputOptions);
const outputResults = [...emitOutputResults(result, outputOptions)];
if (!watch) {
await result.dispose();
// Set to true to prevent double-disposal of the result context in the finally block on generator exit
watchLoopStarted = true;
}
Comment thread
clydin marked this conversation as resolved.
yield* outputResults;

// Finish if watch mode is not enabled
if (!watcher) {
Expand Down
Loading