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.
The MessageChannel shim in
nodePolyfills.tswas a transitional workaround:react-dom/server.browserconstructs aMessageChannelat 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-lightcondition, so SSR bundles loadreact-dom/server.edgeinstead — 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.