/** * Inject minimal __REACT_DEVTOOLS_GLOBAL_HOOK__ before React loads. * React checks for this hook during module initialization and registers its * renderer via hook.inject(). This gives us access to renderer.overrideProps() * for live component prop modification in the inspector. * * Must execute before React's module-level code runs. * * When react-refresh-runtime runs first (as an rspack runtime module), * it may create __REACT_DEVTOOLS_GLOBAL_HOOK__ with an inject() that * doesn't populate the renderers Map. We patch the existing hook to * ensure renderers are always tracked. */ export {}; declare global { interface Window { __REACT_DEVTOOLS_GLOBAL_HOOK__?: any; } }