/** * react-native specifiers whose upstream JavaScript must stay in a guest bundle. * * rnx owns the rest of the react-native package through its host-module registry. * these modules instead run against globals installed by the simulator, which * preserves upstream platform, style, event-emitter, and TurboModule behavior. */ export const REACT_NATIVE_PASSTHROUGH_SPECIFIERS: readonly string[] = [ 'react-native/Libraries/vendor/emitter', 'react-native/Libraries/Components/View/ReactNativeStyleAttributes', 'react-native/Libraries/StyleSheet', 'react-native/Libraries/Utilities/differ', 'react-native/Libraries/Utilities/stringifySafe', 'react-native/src/private/assets/AssetRegistry', 'react-native/src/private/featureflags', 'react-native/Libraries/TurboModule/TurboModuleRegistry', 'react-native/Libraries/Utilities/Platform', 'react-native/Libraries/Utilities/NativePlatformConstants', 'react-native/src/private/specs_DEPRECATED/modules/NativePlatformConstants', ] export function isReactNativePassthroughSpecifier(specifier: string): boolean { return REACT_NATIVE_PASSTHROUGH_SPECIFIERS.some( (passthrough) => specifier === passthrough || specifier.startsWith(`${passthrough}/`), ) }