diff --git a/packages/react-native/Package.swift b/packages/react-native/Package.swift index bf6f3e98149..6280f48ab08 100644 --- a/packages/react-native/Package.swift +++ b/packages/react-native/Package.swift @@ -84,7 +84,10 @@ let reactDebug = RNTarget( let jsi = RNTarget( name: .jsi, path: "ReactCommon/jsi", - excludedPaths: ["jsi/test", "CMakeLists.txt", "jsi/CMakeLists.txt"], + // JSI is a part of hermes-engine. Including them also in react-native will violate the One Definition Rule. + // Precompiled binaries are only supported with hermes - so we can safely exclude the jsi.cpp file. + // https://github.com/facebook/react-native/issues/53257 + excludedPaths: ["jsi/test", "jsi/jsi.cpp", "CMakeLists.txt", "jsi/CMakeLists.txt"], dependencies: [.reactNativeDependencies] )