Skip to content
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

Use @react-native-communty/cli-plugin-metro project to bundling, and remove custom code in CLI and related packages #328

Closed
afoxman opened this issue Jun 28, 2021 · 5 comments · Fixed by #2589
Labels
feature: metro This is related to Metro upstream This should be fixed/reported upstream

Comments

@afoxman
Copy link
Contributor

afoxman commented Jun 28, 2021

I created @rnx-kit/metro-service from code in @react-native-community/cli to give us immediate access to calling Metro programmatically.

Check with @react-native-community/cli devs -- grabbou specifically -- about factoring out the code that talks to metro.

@tido64 tido64 added the upstream This should be fixed/reported upstream label Jun 28, 2021
@afoxman
Copy link
Contributor Author

afoxman commented Jun 28, 2021

The code I separated out of @react-native-community/cli is the buildBundle API and all subordinate APIs and types.

See /packages/cli/src/commands/bundle/buildBundle.ts.

@afoxman afoxman mentioned this issue Jun 28, 2021
@tido64 tido64 added the feature: metro This is related to Metro label Jul 8, 2021
@afoxman
Copy link
Contributor Author

afoxman commented Jul 13, 2021

Talked with some people on discord including a maintainer, and I got the nod to go ahead with refactoring bundling & config code into separate cli packages.

  • Move bundling command logic into /packages/cli-bundle-api and submit PR. There was an ask to focus on the asset logic and leave the bundling "command" where it is. This makes sense, but I need to review so I don't lose any logic.
  • Once approved, submit fixes on top from the this PR
  • Also, submit a PR which exposes the Metro config loader (and dependencies) into /packages/metro-config
  • Once released/published, make use of both packages in our CLI

PR: react-native-community/cli#1447
@react-native-community/cli release version 6.1.0 includes the PR

@afoxman afoxman changed the title Discuss exposing metro APIs from the @react-native-communty/cli project Expose metro APIs from the @react-native-communty/cli project Jul 13, 2021
@afoxman afoxman self-assigned this Jul 15, 2021
@afoxman afoxman changed the title Expose metro APIs from the @react-native-communty/cli project Use @react-native-communty/cli-plugin-metro project to bundling, and remove custom code in CLI and related packages Jun 1, 2022
@afoxman
Copy link
Contributor Author

afoxman commented Jun 1, 2022

Still need to remove the custom code I added (copied) from @rnc community project. Now that it's all wrapped up and exposed through CLI, we should use that instead.

@afoxman afoxman added this to rnx-kit Jun 1, 2022
@afoxman afoxman moved this to 🌳 Backlog in rnx-kit Jun 1, 2022
@tido64
Copy link
Member

tido64 commented Jul 21, 2023

For future reference, @react-native-community/cli@6.1.0 is equivalent to react-native@0.66.

@kelset
Copy link
Contributor

kelset commented Aug 7, 2023

headsup: things have been moving around -> facebook/react-native#38795

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature: metro This is related to Metro upstream This should be fixed/reported upstream
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants