Skip to content

fix(hot): publish sync instead of built for unchanged bundles#2357

Merged
bjohansebas merged 2 commits into
hot-middlewarefrom
fix/hot-multi-compiler-sync
Jul 23, 2026
Merged

fix(hot): publish sync instead of built for unchanged bundles#2357
bjohansebas merged 2 commits into
hot-middlewarefrom
fix/hot-multi-compiler-sync

Conversation

@bjohansebas

Copy link
Copy Markdown
Member

With a MultiCompiler, rebuilding one child re-emits done for every child. Clients of the unchanged bundles then try to fetch a hot-update manifest that was never emitted (404 / "Cannot find update", or an unwanted full reload with reload=true).

Compare each bundle's hash against the previous build and announce unchanged bundles as sync instead of built. The first build still publishes built, and new clients are still caught up with sync — but no longer while a rebuild is in progress.

Ref webpack/webpack-hot-middleware#312

Summary

What kind of change does this PR introduce?

Did you add tests for your changes?

Does this PR introduce a breaking change?

If relevant, what needs to be documented once your changes are merged or what have you already documented?

Use of AI

@changeset-bot

changeset-bot Bot commented Jul 20, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: f50e3fb

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@codecov

codecov Bot commented Jul 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.55%. Comparing base (c70ce51) to head (f50e3fb).
⚠️ Report is 1 commits behind head on hot-middleware.

Additional details and impacted files
@@                Coverage Diff                 @@
##           hot-middleware    #2357      +/-   ##
==================================================
- Coverage           93.61%   93.55%   -0.06%     
==================================================
  Files                   4        4              
  Lines                1190     1195       +5     
  Branches              358      360       +2     
==================================================
+ Hits                 1114     1118       +4     
- Misses                 68       69       +1     
  Partials                8        8              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

With a MultiCompiler, rebuilding one child re-emits done for every
child. Clients of the unchanged bundles then try to fetch a hot-update
manifest that was never emitted (404 / "Cannot find update", or an
unwanted full reload with reload=true).

Compare each bundle's hash against the previous build and announce
unchanged bundles as `sync` instead of `built`. The first build still
publishes `built`, and new clients are still caught up with `sync` —
but no longer while a rebuild is in progress.

Ref webpack/webpack-hot-middleware#312
@bjohansebas
bjohansebas force-pushed the fix/hot-multi-compiler-sync branch from 8a15cc0 to f50e3fb Compare July 23, 2026 17:13
@bjohansebas
bjohansebas merged commit 8b88620 into hot-middleware Jul 23, 2026
18 checks passed
@bjohansebas
bjohansebas deleted the fix/hot-multi-compiler-sync branch July 23, 2026 17:18
bjohansebas added a commit that referenced this pull request Jul 24, 2026
* fix(hot): publish sync instead of built for unchanged bundles

With a MultiCompiler, rebuilding one child re-emits done for every
child. Clients of the unchanged bundles then try to fetch a hot-update
manifest that was never emitted (404 / "Cannot find update", or an
unwanted full reload with reload=true).

Compare each bundle's hash against the previous build and announce
unchanged bundles as `sync` instead of `built`. The first build still
publishes `built`, and new clients are still caught up with `sync` —
but no longer while a rebuild is in progress.

Ref webpack/webpack-hot-middleware#312

* fixup!
bjohansebas added a commit that referenced this pull request Jul 25, 2026
* fix(hot): publish sync instead of built for unchanged bundles

With a MultiCompiler, rebuilding one child re-emits done for every
child. Clients of the unchanged bundles then try to fetch a hot-update
manifest that was never emitted (404 / "Cannot find update", or an
unwanted full reload with reload=true).

Compare each bundle's hash against the previous build and announce
unchanged bundles as `sync` instead of `built`. The first build still
publishes `built`, and new clients are still caught up with `sync` —
but no longer while a rebuild is in progress.

Ref webpack/webpack-hot-middleware#312

* fixup!
bjohansebas added a commit that referenced this pull request Jul 25, 2026
* fix(hot): publish sync instead of built for unchanged bundles

With a MultiCompiler, rebuilding one child re-emits done for every
child. Clients of the unchanged bundles then try to fetch a hot-update
manifest that was never emitted (404 / "Cannot find update", or an
unwanted full reload with reload=true).

Compare each bundle's hash against the previous build and announce
unchanged bundles as `sync` instead of `built`. The first build still
publishes `built`, and new clients are still caught up with `sync` —
but no longer while a rebuild is in progress.

Ref webpack/webpack-hot-middleware#312

* fixup!
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