Skip to content

Remove MessageChannel shim #2247

Description

@rymsha

The MessageChannel shim in nodePolyfills.ts was a transitional workaround: react-dom/server.browser constructs a MessageChannel at module-load time, so SSR bundles built by @enonic/react4xp 6.x could not load without it.

Since enonic/npm-react4xp#1627 (shipped in @enonic/react4xp 7.0.0), the webpack configs resolve React packages with the edge-light condition, so SSR bundles load react-dom/server.edge instead — which has no MessageChannel dependency. The shim's own code comment says to remove it once that happens (see react/react#31827).

Consequence: apps must rebuild with @enonic/react4xp >= 7.0.0. Assets compiled with 6.x will fail at SSR engine warmup with MessageChannel is not defined. This is documented in the upgrade notes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions