-
Notifications
You must be signed in to change notification settings - Fork 417
Description
We are using fork-ts-checker-webpack-plugin
to run TypeScript checks in watch mode.
This plugin starts TypeScript in watch mode in a separate process. It needs to know, when user stops the webpack's watcher to be able to stop TypeScript service. So, it is listening to watchClose
hook.
However, #319 introduce a watcher stop/start after each recompilation. This leads to killing the TS service and starting it again. See https://github.com/Realytics/fork-ts-checker-webpack-plugin/blob/5f5d967e07c7da0e860b6854857da145c33c7c0f/src/index.ts#L296.
The problem is, that type-check can easily took 5-6 seconds for the first run and less than 200ms after recompilation. However, this stop/start behavior causes that it always starts from scratch.
So, my question is: Are we able to avoid stoping the watcher? I'm pretty sure that other webpack plugins can depend on it too. Also, fork-ts-checker-webpack-plugin
is basically a standard for TS projects.
EDIT:
Another issue is that sometimes recompilation occurs twice: