Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webpack drops aggregated changes when using Watching.resume() #12882

Closed
vladar opened this issue Mar 12, 2021 · 1 comment
Closed

Webpack drops aggregated changes when using Watching.resume() #12882

vladar opened this issue Mar 12, 2021 · 1 comment

Comments

@vladar
Copy link
Contributor

vladar commented Mar 12, 2021

Bug report

What is the current behavior?

This is an issue with resume/suspend flow of webpack Watching. In an edge case (described below) webpack drops some of the aggregated changes and they are not included in the compilation result.

If the current behavior is a bug, please provide the steps to reproduce.

All of the following conditions must be met to reproduce it:

  1. resume is called between changed (invalid) and aggregated watchpack events
  2. empty compilation caused by resume is finished before aggregated event fires

I've opened a PR with a failing test to demonstrate it: #12881

It is easier to reproduce this with higher aggregation timeout but we've seen this in Gatsby in the real-world projects with default timeout as well (just harder to reproduce).

What is the expected behavior?

Resumed compilation should include all aggregated changes.

Other relevant information:
webpack version: latest
Node.js version: 12.20.0
Operating System: Windows
Additional tools: Jest? 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants