/** * Shim mapping `react-dom` to WordPress' bundled `window.ReactDOM`. * ONLY aliased in vite.editor.config.ts (see react.ts). Requires the * `react-dom` script dependency on the consuming bundle. */ const ReactDOM = (window as any).ReactDOM ?? {}; export const { createPortal, flushSync, findDOMNode, render, unmountComponentAtNode } = ReactDOM; export default ReactDOM;