Skip to content

fix: resolve asset registry on React Native 0.87 - #54

Open
huytdps13400 wants to merge 1 commit into
oblador:masterfrom
huytdps13400:fix/53-react-native-087-asset-registry
Open

huytdps13400 wants to merge 1 commit into
oblador:masterfrom
huytdps13400:fix/53-react-native-087-asset-registry

Conversation

@huytdps13400

Copy link
Copy Markdown

Summary

Fixes #53.

React Native 0.87 moved AssetRegistry into react-native core and stopped installing @react-native/assets-registry. The static standalone import therefore prevents Metro from bundling consumers on React Native 0.87.

This resolves the core registry first and retains the standalone registry as a fallback for React Native 0.86 and older, matching the compatibility approach already merged in oblador/react-native-vector-icons#1924. It adds no dependency and does not change the public API or asset payload.

Verification

  • yarn jest src/getAssetByID.spec.js --runInBand — 3 passed
  • yarn test --runInBand — 5 suites, 13 tests, 2 snapshots passed
  • yarn test:plugin — 2 suites, 2 tests passed
  • Packed this branch into a clean React Native 0.87.0 consumer, confirmed node_modules/@react-native/assets-registry was absent, and successfully produced an iOS bundle with Metro 0.87.0

The full unit suite used the repository LFS JAR downloaded from the official GitHub media URL and verified against the checked-in SHA-256 pointer.

React Native 0.87 moved AssetRegistry into core and no longer installs the standalone registry package. Prefer the core registry while preserving the standalone fallback for older React Native versions.

This branch has not been deployed

No deployments
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

Successfully merging this pull request may close these issues.

React Native 0.87 Support

1 participant