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

Support for React-Native #2811

Open
2 tasks done
jbroma opened this issue Jul 30, 2024 · 4 comments
Open
2 tasks done

Support for React-Native #2811

jbroma opened this issue Jul 30, 2024 · 4 comments

Comments

@jbroma
Copy link
Contributor

jbroma commented Jul 30, 2024

Clear and concise description of the problem

Re.Pack supports MF V1, for V2 supports we need adjust how containers are loaded in React-Native environment.

Suggested solution

Alternative

  • auto preload can be disabled through loaded-first strategy and that can come from Re.Pack's own runtime plugin

Additional context

Related Re.Pack issue: callstack/repack#518
Related Re.Pack PR: callstack/repack#674

Validations

  • Read the Contributing Guidelines.
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
@2heal1
Copy link
Member

2heal1 commented Sep 20, 2024

hey i don't sure why it depends on the disable autoPreload . And i support the shareStrategy option , which you can config in runtime/build configuration , maybe this can satisfy your need ?

@jbroma
Copy link
Contributor Author

jbroma commented Sep 23, 2024

hey i don't sure why it depends on the disable autoPreload . And i support the shareStrategy option , which you can config in runtime/build configuration , maybe this can satisfy your need ?

hey, shareStrategy is definitely sufficient for this exact purpose, I've been using it in the POC ever since it was implemented and it works as expected 👍

As to why it's necessary: RN startup is complicated - we need to have eager access to react and react-native packages there, but at the same time we want to share them with other federated modules. When it's set to version-first, I think both of these dependencies were set to Promises and this caused Errors in RN env since we need to have sync startup.

Copy link
Contributor

Stale issue message

@zackarychapple
Copy link
Collaborator

@jbroma can you add some more flavor to this one since we had the week working on it.

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

No branches or pull requests

3 participants