callstack / react-native-builder-bob

👷‍♂️ Simple set of CLIs to scaffold and build React Native libraries for different targets
https://callstack.github.io/react-native-builder-bob/
2.78k stars 184 forks source link

fix: ensure assets are registered correctly #608

Closed satya164 closed 2 months ago

satya164 commented 2 months ago

react-native uses a asset registry package to register assets. seems the library and the example app are using different copies of this package, presumably because Expo CLI embeds @react-native/assets-registry verbatim in the code during transform. this causes the library not to use the same copy of the package as react-native. this results in broken assets in the app.

with this change we're ensuring that we always load a single version of the package to ensure assets work.

closes #607