Skip to content

Commit d12c217

Browse files
authored
Merge pull request TypeStrong#104 from liangchunn/master
Fix webpack4 hooks not being initialized properly
2 parents ed92e3d + 16ddf7a commit d12c217

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/index.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -280,14 +280,14 @@ class ForkTsCheckerWebpackPlugin {
280280
}
281281
this.compiler.hooks.forkTsCheckerServiceBeforeStart = new AsyncSeriesHook([]);
282282

283-
this.compiler.hooks.forkTsCheckerCancel = new SyncHook([]);
284-
this.compiler.hooks.forkTsCheckerServiceStartError = new SyncHook([]);
285-
this.compiler.hooks.forkTsCheckerWaiting = new SyncHook([]);
286-
this.compiler.hooks.forkTsCheckerServiceStart = new SyncHook([]);
287-
this.compiler.hooks.forkTsCheckerReceive = new SyncHook([]);
283+
this.compiler.hooks.forkTsCheckerCancel = new SyncHook(['cancellationToken']);
284+
this.compiler.hooks.forkTsCheckerServiceStartError = new SyncHook(['error']);
285+
this.compiler.hooks.forkTsCheckerWaiting = new SyncHook(['hasTsLint']);
286+
this.compiler.hooks.forkTsCheckerServiceStart = new SyncHook(['tsconfigPath', 'tslintPath', 'watchPaths', 'workersNumber', 'memoryLimit']);
287+
this.compiler.hooks.forkTsCheckerReceive = new SyncHook(['diagnostics', 'lints']);
288288
this.compiler.hooks.forkTsCheckerServiceOutOfMemory = new SyncHook([]);
289-
this.compiler.hooks.forkTsCheckerEmit = new SyncHook([]);
290-
this.compiler.hooks.forkTsCheckerDone = new SyncHook([]);
289+
this.compiler.hooks.forkTsCheckerEmit = new SyncHook(['diagnostics', 'lints', 'elapsed']);
290+
this.compiler.hooks.forkTsCheckerDone = new SyncHook(['diagnostics', 'lints', 'elapsed']);
291291

292292
// for backwards compatibility
293293
this.compiler._pluginCompat.tap(checkerPluginName, (options: any) => {

0 commit comments

Comments
 (0)