Skip to content

fix: avoid accumulating overlay entries across rebuilds - #1055

Open
OskarEichler wants to merge 1 commit into
pmmmwh:mainfrom
OskarEichler:codex/compilation-overlay-entries
Open

fix: avoid accumulating overlay entries across rebuilds#1055
OskarEichler wants to merge 1 commit into
pmmmwh:mainfrom
OskarEichler:codex/compilation-overlay-entries

Conversation

@OskarEichler

Copy link
Copy Markdown

Fix

Stop accumulating duplicate error-overlay entries across rebuilds when using socket integrations such as webpack-hot-middleware.

socketEntryData currently lives for the entire compiler lifetime and is appended to on every make. Three real sequential compilations produce one, two, and three overlay dependencies respectively. Stale entry names are also retained when a dynamic entry function changes its output.

Implementation

Discover integration positions inside the existing finishMake callback, using only the current compilation. This removes the separate make hook and persistent mutable array. Overlay placement remains immediately after the integration entry, and the global-entry fallback is preserved.

Verification

  • Existing unit/loader suite: 106 tests across 13 suites, 26 snapshots passed.
  • ESLint, formatting, declaration compilation, and whitespace checks passed.
  • Twenty real sequential Webpack compilations keep exactly one correctly ordered overlay entry each.
  • Real dynamic-entry compilations handle renaming entries and removing the integration, including the global-overlay fallback.
  • Full suite including headless Chrome HMR conformance with Webpack Dev Server 6: 122 tests across 14 suites, 26 snapshots passed. This uses the existing upstream harness; no new or modified test files are included.

Compatibility / breaking changes

No public API, dependency, runtime, or supported-platform changes. This fixes compilation bookkeeping and removes work that increased with each rebuild; no application rendering-performance claim.

@codesandbox

codesandbox Bot commented Aug 27, 2026

Copy link
Copy Markdown

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

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.

1 participant