You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(compiler): fix file watcher sometimes doesn't trigger rebuild (#6191)
* fix(compiler): fix file watcher sometimes doesn't trigger rebuild
The existing implementation was running into the `lastTsBuilder && !timeoutId` condition with a `timeoutId` being present
even though there was no running build or any other good reason not to rebuild.
The change simplifies the implementation by using a recursive `setTimeout` to wait for pending builds.
This allows to:
- remove the extra `rebuildTimer` which was arguably confusing
- remove the clearTimeout override
Since we immediately call `clearTimeout(timeoutId)` in the `setTimeout` override, we don't stack up rebuild requests.
After applying these changes the watcher behaves beautifully.
fixes: #6190
* style(compiler): fix code formatting
0 commit comments