Skip to content

feat!: remove overlay support#89

Merged
chenjiahan merged 1 commit intomainfrom
chenjiahan/remove-legacy-overlay
Apr 7, 2026
Merged

feat!: remove overlay support#89
chenjiahan merged 1 commit intomainfrom
chenjiahan/remove-legacy-overlay

Conversation

@chenjiahan
Copy link
Copy Markdown
Member

@chenjiahan chenjiahan commented Apr 7, 2026

Summary

Remove the overlay option from @rspack/plugin-react-refresh, along with its runtime, socket integration, public export, and related tests/docs.

Background

Rspack dev server and Rsbuild already provide maintained overlay implementations. Keeping another overlay in this plugin introduces overlapping behavior and can result in duplicate overlays in the browser.

The plugin overlay is disabled by default and not part of the common workflow, yet it adds notable maintenance cost. It also has known issues with HMR recovery and ANSI rendering. Relying on the built-in overlays provides a more stable and consistent experience, so this plugin no longer maintains a separate implementation.

@chenjiahan chenjiahan changed the title refactor!: remove legacy overlay support feat!: remove overlay support Apr 7, 2026
@chenjiahan chenjiahan marked this pull request as ready for review April 7, 2026 10:33
Copilot AI review requested due to automatic review settings April 7, 2026 10:33
@chenjiahan chenjiahan merged commit 541eee0 into main Apr 7, 2026
6 checks passed
@chenjiahan chenjiahan deleted the chenjiahan/remove-legacy-overlay branch April 7, 2026 10:34
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes the plugin-maintained error overlay feature from @rspack/plugin-react-refresh (option, runtime entry, socket integrations, public exports, and related tests/docs) to rely on dev-server/Rsbuild overlays instead.

Changes:

  • Dropped the overlay option and all associated runtime/socket integration code paths.
  • Removed the published ./overlay export and cleaned up dependencies/lockfile entries that were only used by the overlay.
  • Updated docs, example config, and tests to reflect the removal.

Reviewed changes

Copilot reviewed 34 out of 35 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
THIRDPARTY.md Removes third-party attribution that was only required for the overlay ANSI utilities.
test/test.spec.ts Drops overlay/socket-integration-specific test coverage.
src/utils/getSocketIntegration.ts Removes socket integration resolution utility (overlay-related).
src/utils/getIntegrationEntry.ts Removes integration entry resolver (overlay-related).
src/utils/getAdditionalEntries.ts Removes logic that injected overlay runtime entries.
src/sockets/WHMEventSource.ts Removes webpack-hot-middleware socket bridge.
src/sockets/WDSSocket.ts Removes webpack-dev-server socket bridge.
src/sockets/utils/getWDSMetadata.ts Removes WDS client metadata detection (overlay-related).
src/sockets/utils/getUrlFromParts.ts Removes socket URL construction helper.
src/sockets/utils/getSocketUrlParts.ts Removes socket URL parsing/derivation logic (overlay-related).
src/sockets/utils/getCurrentScriptSource.ts Removes script source helper used for socket URL recovery.
src/options.ts Removes overlay option types/normalization and simplifies normalized options typing.
src/index.ts Removes overlay entry/socket injection and overlay-related Provide/Define wiring; always injects react-refresh entry only.
rslib.config.mts Removes build config that emitted CJS artifacts for socket modules.
README.md Removes user-facing documentation for the overlay option.
pnpm-lock.yaml Removes overlay-only dependencies from the lockfile.
package.json Removes ./overlay export and overlay-only deps/peer deps.
example/rspack.config.ts Removes overlay: true usage from the example.
client/utils/retry.js Removes retry helper used for overlay socket initialization.
client/utils/formatWebpackErrors.js Removes error formatting helper used by overlay compile errors.
client/utils/errorEventHandlers.js Removes runtime error event hook helpers used by overlay.
client/utils/ansi-html.js Removes ANSI-to-HTML converter used by overlay UI.
client/refreshUtils.js Removes overlay interactions from refresh runtime and makes refresh callback optional.
client/reactRefresh.js Removes overlay plumbing when invoking executeRuntime.
client/overlay/utils.js Removes overlay DOM helpers.
client/overlay/theme.js Removes overlay theme constants.
client/overlay/index.js Removes overlay UI implementation.
client/overlay/containers/RuntimeErrorContainer.js Removes overlay runtime error container.
client/overlay/containers/CompileErrorContainer.js Removes overlay compile error container.
client/overlay/components/RuntimeErrorStack.js Removes overlay stack rendering component.
client/overlay/components/RuntimeErrorHeader.js Removes overlay header component.
client/overlay/components/RuntimeErrorFooter.js Removes overlay footer/pagination component.
client/overlay/components/PageHeader.js Removes overlay page header component.
client/overlay/components/CompileErrorTrace.js Removes overlay compile error trace component.
client/errorOverlayEntry.js Removes overlay runtime entry that wired sockets + overlay rendering.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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