File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed
packages/react-native/scripts/codegen/generate-artifacts-executor Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments