File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 44 raise "React Native Node-API cannot reliably patch JSI when React Native Core is prebuilt."
55end
66
7+ def get_react_native_package
8+ if caller . any? { |frame | frame . include? ( "node_modules/react-native-macos/" ) }
9+ return "react-native-macos"
10+ elsif caller . any? { |frame | frame . include? ( "node_modules/react-native/" ) }
11+ return "react-native"
12+ else
13+ raise "Unable to determine React Native package from call stack."
14+ end
15+ end
16+
717if ENV [ 'REACT_NATIVE_OVERRIDE_HERMES_DIR' ] . nil?
8- VENDORED_HERMES_DIR ||= `npx react-native-node-api vendor-hermes --silent '#{ Pod ::Config . instance . installation_root } '` . strip
18+ VENDORED_HERMES_DIR ||= `npx react-native-node-api vendor-hermes --react-native-package ' #{ get_react_native_package ( ) } ' -- silent '#{ Pod ::Config . instance . installation_root } '` . strip
919 # Signal the patched Hermes to React Native
1020 ENV [ 'BUILD_FROM_SOURCE' ] = 'true'
1121 ENV [ 'REACT_NATIVE_OVERRIDE_HERMES_DIR' ] = VENDORED_HERMES_DIR
You can’t perform that action at this time.
0 commit comments