refactor: use @react-native/assets-registry/registry#1135
refactor: use @react-native/assets-registry/registry#1135
@react-native/assets-registry/registry#1135Conversation
🦋 Changeset detectedLatest commit: 4bea110 The changes in this PR will be included in the next version bump. This PR includes changesets to release 6 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 ↗︎
|
|
upon further tests turns out it's not that simple - when we use deep import of AssetRegistry from core it results in a singleton registry module (since all imports of if we however request the module from the context of project it will result in duplicate inclusion of assets registry, causing the module to be included twice in the build and not pointing to the same registry |
|
@jbroma We probably want some abstraction then similar to Making a note to discuss this at the Core Contributors Summit. |
also not a big fan of root level entrypoints 😅 I've managed to almost get around this by rerouting all imports in the bundle to a virtual module from Re.Pack (kinda like a I'll close this PR for now and we will tackle this in the future 👍 |
Summary
based on the suggestion from @huntie, instead of using deep import from RN core, we can import
@react-native/assets-registry/registrydirectly.Test plan