Skip to content

Commit

Permalink
[android] Remove a check that is no longer needed (#535)
Browse files Browse the repository at this point in the history
* Removed a check that is no longer needed

We've had some issue with monorepos when resolving the codegen config on Android in other libraries, and found that due to versions no longer in use we could now remove the version test in `react-native-config.js` and always return the component descriptor etc.

(The monorepo issue was with using `require.main.require` which will resolve to the calling script and not the module)

For reference, here is the same PR in @react-native-community/slider:

callstack/react-native-slider#657

* cr: Reverted and simplified change after code review

Removed previous change and made the `supportsCodegenConfig` variable true initially

* revert: reverted commit - removed last line.
  • Loading branch information
chrfalch authored Oct 16, 2024
1 parent 2c827b1 commit 8f99d4d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion react-native.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
let supportsCodegenConfig = false;
let supportsCodegenConfig = true;
try {
const rnCliAndroidVersion = require.main.require(
'@react-native-community/cli-platform-android/package.json',
Expand Down

0 comments on commit 8f99d4d

Please sign in to comment.