Description
The renderer modules under Libraries/Renderer/oss/
use Haste. Since these modules are auto-generated, we need to make the renderer-generator rewrite the imports. This work mostly needs to happen in the React repo.
The code in the React repo makes assumptions about the React Native repo, like the existence of the InitializeCore
module. We need to decide on an interface between the renderer in the React repo and the other modules in the React Native repo (ex: path-based imports or exposing InitializeCore
through a module like react-native/Libraries/ReactPrivate
that only React is allowed to import).
As part of implementing the interface, we will also need to update React's Rollup scripts and some Flow hooks to work with the new interface.
I'll take a look at the private interface approach, I think it may work out nicely and tighten up the interface in the sense that cross-repo Haste imports are an abstraction violation.
RN PR: #24782
React PR: facebook/react#15604
Sync PR: #25010