Conversation
🦋 Changeset detectedLatest commit: f4e1cc8 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
| shared: { | ||
| react: { | ||
| singleton: true, | ||
| eager: true, |
There was a problem hiding this comment.
Why do they have to be eager?
There was a problem hiding this comment.
react-native and react need to be present for initialisation of the environment done in react-native/Libraries/Core/InitializeCore.js - Hermes engine doesn't have event loop on its own -> no microtasks -> no timers like setImmediate or setTimeout.
There was a problem hiding this comment.
they can most likely be made not eager but that would require rewriting the initialization part and maintaining it here. OOT platforms could also potentially customize it (im not sure this is the case now though)
There was a problem hiding this comment.
So I'm guessing there's no promise either? Like wouldn't it help if the entrypoint itself returned a promise so that entry setup itself is asynchronous? Like my hoisted runtime experiment does.
There was a problem hiding this comment.
I wonder if lynx supports event loops. 🤔
This is something I'll probably want to bake into our vm if possible
There was a problem hiding this comment.
So I'm guessing there's no promise either? Like wouldn't it help if the entrypoint itself returned a promise so that entry setup itself is asynchronous? Like my hoisted runtime experiment does.
yeah that would be ideal, but that would need more tinkering. I think I tried with hoisted runtime once but didn't pursue it much further. The biggest limiting factor is maintenance of custom initialisation logic.
On the other side, @robik once had an idea of creating an extra layer between RN Core and Hermes called RN Runtime which could be a place for stuff like this. Not sure whats the status of that, maybe he can share something here as well :)
There was a problem hiding this comment.
Yeah, I think this would solve this issue. The RFC is in pre-published state for now, should be up for discussions soon :)
Summary
Closes #518
ModuleFederationPlugintoModuleFederationPluginV1ModuleFederationPluginas wrapper for MF1 with wrapper to make this a non-breaking changeModuleFederationPluginV2@deprecatedto all federated utilsTest plan