Skip to content

Commit 4239bc3

Browse files
committed
Fix handling for noEmitOnError: true
1 parent 54efd3f commit 4239bc3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/utilities/compile.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ function createWatchCompilerHost(ts, options, project, callbacks) {
4040
host.afterProgramCreate = function() {
4141
afterCreate.apply(this, arguments);
4242
if (callbacks.buildComplete) {
43-
callbacks.buildComplete();
43+
// Use nextTick to preserve ordering between the `buildComplete` callback
44+
// and the diagnostic hooks below
45+
process.nextTick(() => callbacks.buildComplete());
4446
}
4547
};
4648

0 commit comments

Comments
 (0)