mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Fix Typo and skip generation of app-specific component registration (#47547)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/47547 In [#47176](https://github.com/facebook/react-native/pull/47176) we disabled the generation of the component registration for app specific components as it was creating a circular dependency between the app and React Native. However, we made a couple of typos that make it not work as expected and users picked up those typos soon. This change fixes them for good. ## Changelog [iOS][Fixed] - Properly stop generating component registration for components defined in app. Reviewed By: blakef Differential Revision: D65750433 fbshipit-source-id: 1a879c5be014905558b9fd05e6f16ac36b784ed6
This commit is contained in:
committed by
Blake Friedman
parent
9f65442f2d
commit
1e659dc44e
@@ -492,7 +492,7 @@ function rootCodegenTargetNeedsThirdPartyComponentProvider(pkgJson, platform) {
|
||||
function dependencyNeedsThirdPartyComponentProvider(
|
||||
schemaInfo,
|
||||
platform,
|
||||
appCondegenConfigSpec,
|
||||
appCodegenConfigSpec,
|
||||
) {
|
||||
// Filter the react native core library out.
|
||||
// In the future, core library and third party library should
|
||||
@@ -503,7 +503,7 @@ function dependencyNeedsThirdPartyComponentProvider(
|
||||
// the symbols defined in the app.
|
||||
return (
|
||||
!isReactNativeCoreLibrary(schemaInfo.library.config.name, platform) &&
|
||||
schemaInfo.library.config.name !== appCondegenConfigSpec
|
||||
schemaInfo.library.config.name !== appCodegenConfigSpec
|
||||
);
|
||||
}
|
||||
|
||||
@@ -719,7 +719,7 @@ function execute(projectRoot, targetPlatform, baseOutputPath) {
|
||||
dependencyNeedsThirdPartyComponentProvider(
|
||||
schemaInfo,
|
||||
platform,
|
||||
pkgJson.codegenConfig?.appCondegenConfigSpec,
|
||||
pkgJson.codegenConfig?.name,
|
||||
),
|
||||
);
|
||||
const schemas = filteredSchemas.map(schemaInfo => schemaInfo.schema);
|
||||
|
||||
Reference in New Issue
Block a user