Menu

Uniwind className not working on Android: the Metro browser condition left over from NativeWind
📰

Uniwind className not working on Android: the Metro browser condition left over from NativeWind

DEV Community: reactnative·Mohamed Gado·about 7 hours ago
#bpjjpKzu
Long article (759 words) — no AI summary yet.
Reading 0:00
15s threshold

I moved Nafis , my gold and silver price app, from NativeWind 4 to Uniwind. Typecheck passed, 1,318 tests passed and lint passed. Then the app opened on a phone with almost no styling: dark text on a dark page, and a Next button that had lost its row layout.

The cause was one line in metro.config.js from the NativeWind days:

config . resolver . unstable_conditionNames = [ 'browser' , 'require' , 'react-native' ] ;

Enter fullscreen mode

Exit fullscreen mode

Delete it, clear Metro's cache and rebuild.

Why that line breaks Uniwind

A modern package can offer different files to different platforms through the exports field.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.