Skip to content

Commit 8bc9101

Browse files
committed
Always add findProjectRootLibraries
1 parent 5ee2fb1 commit 8bc9101

File tree

1 file changed

+9
-9
lines changed
  • packages/react-native/scripts/codegen/generate-artifacts-executor

1 file changed

+9
-9
lines changed

packages/react-native/scripts/codegen/generate-artifacts-executor/utils.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -142,20 +142,20 @@ function findCodegenEnabledLibraries(
142142
baseOutputPath /*: string */,
143143
reactNativeConfig /*: $FlowFixMe */,
144144
) /*: Array<$FlowFixMe> */ {
145-
if (!!readGeneratedReactNativeConfig(baseOutputPath)) {
146-
// If we ran autolinking, we shouldn't try to run our own "autolinking-like"
147-
// library discovery
148-
return findLibrariesFromReactNativeConfig(projectRoot, reactNativeConfig);
149-
}
150145
const projectLibraries = findProjectRootLibraries(pkgJson, projectRoot);
151146
if (pkgJsonIncludesGeneratedCode(pkgJson)) {
152147
return projectLibraries;
153148
} else {
154-
return [
155-
...projectLibraries,
156-
...findExternalLibraries(pkgJson, projectRoot),
149+
const libraries = [...projectLibraries];
150+
// If we ran autolinking, we shouldn't try to run our own "autolinking-like"
151+
// library discovery
152+
if (!readGeneratedReactNativeConfig(baseOutputPath)) {
153+
libraries.push(...findExternalLibraries(pkgJson, projectRoot));
154+
}
155+
libraries.push(
157156
...findLibrariesFromReactNativeConfig(projectRoot, reactNativeConfig),
158-
];
157+
);
158+
return libraries;
159159
}
160160
}
161161

0 commit comments

Comments
 (0)