Skip to content

Conversation

@dengr1065
Copy link
Collaborator

The options used for chokidar initialization were not enough to prevent double reloads, often causing both an instant reload and a 2s delayed one. With these changes there is no longer any debouncing on chokidar side and as we don't actually care about the specific file changed, this should work much better. This is mostly relevant for environments where the entire build folder is regenerated when bundling.

The only downside to this approach is a hardcoded settle time of 250ms, but it can be adjusted if needed or exposed as yet another command-line switch.

Remove chokidar built-in event debouncing/aggregating and replace it
with a basic custom implementation with a 250ms settle delay.
@dengr1065 dengr1065 merged commit b3d0e30 into master Jun 14, 2025
1 check passed
@dengr1065 dengr1065 deleted the dengr1065/chokidar-adjustment branch June 16, 2025 21:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants