-
Notifications
You must be signed in to change notification settings - Fork 417
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Unexpected watcher stops #465
Comments
@deftomat we are not using
did you happen to find solution for that? |
I think this is related to webpack/webpack#4991. serverless-webpack/lib/wpwatch.js Line 37 in ffc70bc
|
@mochja Hi, we are using a custom fork as it looks like the project is not maintained anymore. This is a commit which fixed it for us: deftomat@839d2e5 |
@mochja @deftomat rebuild also triggered twice on my project. One thing i notice is that this line on wpwatch.js is never true
On a troubled project however, it is as if there is another source of changes triggering the another new process which i'm still looking for. |
We have stopped using webpack for development and instead use ts directly.
I did spend some time in debugger and there was no additional trigger in our case. |
Released with 5.3.0 |
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:
@dwelch2344, @HyperBrain
The text was updated successfully, but these errors were encountered: