Skip to content
New issue

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

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

Already on GitHub? # to your account

fix: Replace calling internal React Native scripts for launching Metro with CLI's script #1812

Merged

Conversation

szymonrybczak
Copy link
Collaborator

@szymonrybczak szymonrybczak commented Jan 31, 2023

Summary:

Closes #1799

Replace calling internal React Native scripts for launching Metro with CLI's script.

Also this PR, changes the logic and right now it isn't starting packager from relative path, but it launches packager from config.root.
CleanShot 2023-02-06 at 10 44 13@2x

Test Plan:

  1. yarn react-native run-android - should run correctly metro

Copy link
Contributor

@MateWW MateWW left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much for opening this PR! 🚀🥳
It's something I cannot wait for!

@szymonrybczak szymonrybczak force-pushed the fix/change-way-calling-metro branch from e364ad1 to d6d00ee Compare February 1, 2023 08:41
@MateWW
Copy link
Contributor

MateWW commented Feb 13, 2023

Can we verify if moving process.env does not break anything inside react-native?
Are there any parts in react-native that are depending on it?

@szymonrybczak szymonrybczak marked this pull request as ready for review March 1, 2023 10:36
@szymonrybczak
Copy link
Collaborator Author

Hey @tido64, I updated my code. Could you please take a look at it again? 🙏

Copy link
Contributor

@tido64 tido64 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Thanks for fixing this, @szymonrybczak ❤️

packages/cli-plugin-metro/launchPackager.command Outdated Show resolved Hide resolved
.gitignore Outdated Show resolved Hide resolved
@szymonrybczak szymonrybczak force-pushed the fix/change-way-calling-metro branch from 8b93fc8 to d35714c Compare March 8, 2023 08:39
Copy link
Member

@kelset kelset left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@thymikee
Copy link
Member

Looks good. This creates a discrepancy between running packager from CLI vs Xcode. Let's make sure we followup with changes to .xcode.env in the future to make it work ubiquitously

@szymonrybczak szymonrybczak force-pushed the fix/change-way-calling-metro branch from ca41ad7 to a3f8681 Compare March 22, 2023 07:55
@thymikee thymikee changed the title fix: change way calling metro fix: Replace calling internal React Native scripts for launching Metro with CLI's script Mar 23, 2023
@thymikee thymikee merged commit 07c526f into react-native-community:main Mar 23, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Is running packager by calling react-native internal script still necessary for run-android?
5 participants