Commit 46d17ef
Start looking for codegen-enabled dependencies from the project root (#46229)
Summary:
Pull Request resolved: #46229
When running codegen from `pod install`, something affects `require.resolve`, and it starts looking for codegen-enabled dependencies from the workspace root, not the current RN project root.
This is bad if we have different versions of same dependency across multiple workspaces. One of them will be hoisted to the workspace root, and will be used for all the workspaces.
This issue is described in details here #46196
This diff is supposed to fix this by adding the project root path to the `require.resolve` call.
Changelog: [iOS][Fixed] - Codegen will start looking for codegen-enabled dependencies from the project root.
Reviewed By: cipolleschi
Differential Revision: D61850219
fbshipit-source-id: d60a0e72e9c60e862c0d64e227ea3652d1be5a901 parent 773fc8d commit 46d17ef
File tree
1 file changed
+3
-2
lines changed- packages/react-native/scripts/codegen
1 file changed
+3
-2
lines changedLines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
228 | | - | |
| 228 | + | |
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
| |||
240 | 240 | | |
241 | 241 | | |
242 | 242 | | |
| 243 | + | |
243 | 244 | | |
244 | 245 | | |
245 | 246 | | |
| |||
533 | 534 | | |
534 | 535 | | |
535 | 536 | | |
536 | | - | |
| 537 | + | |
537 | 538 | | |
538 | 539 | | |
539 | 540 | | |
| |||
0 commit comments