Skip to content

chore(examples): adjust metro config to allow for easier modify-test loop with react-navigation submodule #2765

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 10, 2025

Conversation

kkafar
Copy link
Member

@kkafar kkafar commented Mar 9, 2025

Description

Caution

TODO: Needs to be rebased on top of main, dropping changes from #2736 done

I've explained the issue in code comments: metro by default picks up source files from
@react-navigation/xxx/lib instead of ones from @react-navigation/xxx/src.
This makes playing with @react-navigation & testing it harder (even when one just need to add some logs)...

Changes

This PR adds a resolver, which explicitly resolves @react-navigation/xxx packages imports to the @react-navigation/xxx/src/* implementation.

This PR also makes sure the metro block-list works correctly.

Test code and steps to reproduce

No extra tests needed - just example apps should build & load.
You can now add a console.log into react-navigation submodule code & it will work!

Checklist

  • Ensured that CI passes

@kkafar kkafar marked this pull request as draft March 9, 2025 10:18
@kkafar kkafar marked this pull request as ready for review March 10, 2025 14:50
@kkafar kkafar force-pushed the @kkafar/formsheet-push-screen-over-2 branch from 8d86158 to 922ab1c Compare March 10, 2025 14:51
@kkafar kkafar merged commit b676cc0 into main Mar 10, 2025
6 of 8 checks passed
@kkafar kkafar deleted the @kkafar/formsheet-push-screen-over-2 branch March 10, 2025 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant