Skip to content

Commit aea60e1

Browse files
walkerburginpiotr-oles
authored andcommitted
Set "compilationDone" before "forkTsCheckerServiceBeforeStart" (#146)
1 parent 102fba2 commit aea60e1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -319,14 +319,14 @@ class ForkTsCheckerWebpackPlugin {
319319
if ('hooks' in this.compiler) {
320320
// webpack 4
321321
this.compiler.hooks.compile.tap(checkerPluginName, () => {
322+
this.compilationDone = false;
322323
this.compiler.hooks.forkTsCheckerServiceBeforeStart.callAsync(() => {
323324
if (this.cancellationToken) {
324325
// request cancellation if there is not finished job
325326
this.cancellationToken.requestCancellation();
326327
this.compiler.hooks.forkTsCheckerCancel.call(this.cancellationToken);
327328
}
328329
this.checkDone = false;
329-
this.compilationDone = false;
330330

331331
this.started = process.hrtime();
332332

@@ -350,14 +350,14 @@ class ForkTsCheckerWebpackPlugin {
350350
} else {
351351
// webpack 2 / 3
352352
this.compiler.plugin('compile', () => {
353+
this.compilationDone = false;
353354
this.compiler.applyPluginsAsync('fork-ts-checker-service-before-start', () => {
354355
if (this.cancellationToken) {
355356
// request cancellation if there is not finished job
356357
this.cancellationToken.requestCancellation();
357358
this.compiler.applyPlugins('fork-ts-checker-cancel', this.cancellationToken);
358359
}
359360
this.checkDone = false;
360-
this.compilationDone = false;
361361

362362
this.started = process.hrtime();
363363

0 commit comments

Comments
 (0)