You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
globalClassNamePolyfill: AssetRegistry missing from react-native re-export whitelist #506
With NativeWind v5 / globalClassNamePolyfill: true, Metro remaps import … from 'react-native' to react-native-css/components. That entry (src/components/index.cts) is a hand-maintained whitelist of RN exports.
AssetRegistry is not on the list. Callers such as expo-asset then do:
import{AssetRegistry}from'react-native';AssetRegistry.getAssetByID(id);// Cannot read property 'getAssetByID' of undefined
This breaks Material Symbol loading for Expo Router NativeTabsmd icons (and any other expo-asset / font path that uses AssetRegistry).
Fix
Add the same getter pattern used for AppRegistry / AppState:
after AppState in src/components/index.cts (and rebuild dist).
require("react-native") from inside this package stays on the real RN module because the Metro resolver treats react-native-css as internal and does not remapped it.
Environment
nativewind@5.0.0-rc.0
react-native-css@3.1.0-rc.0
react-native@0.88 / Expo SDK 58
expo-asset importing AssetRegistry from react-native
Activity