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']; 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. This is Uniwind's entry for its components, in 1.14.0:
"./components": { "types": "./no-types.d.ts", "browser": "./dist/module/components/web/index.js", "react-native": "./src/components/index.ts", "import": "./dist/module/components/web/index.js", "default": "./dist/common/components/web/index.js" } The resolver walks these keys from top to bottom and takes the first one that is in its list of conditions. The order in your Metro config does not matter. The order in the package does.
Uniwind lists browser before react-native. With browser in the Metro list, Android matched it first and got Uniwind's web components. Those pass className on to a DOM element. There is no DOM on Android, so every class was accepted and did nothing.
NativeWind worked with this setting, so it had sat in the file harmlessly until the styling library changed under it.
Why nothing caught it
- TypeScript resolves types on its own path and never asks Metro.
- Unit tests ran in Node, which has its own resolver.
- Lint does not resolve platform files.
- The bundler found a valid file, so there was no warning.
Every check was right about what it checked. None of them looked at which file the Android bundle contains.
Check whether you have it
- Search
metro.config.jsforunstable_conditionNames. If the list hasbrowserand it applies to native builds, that is the likely cause. - Open
node_modules/uniwind/package.jsonand read the order of keys underexports["./components"]. - Build the Android bundle and search it for a file from
components/web. If it is there, you have the wrong copy.
If you need browser for a web build, apply it to web only, not to every platform.
Pin it with a test
A config line like this comes back, usually through a copied snippet. This test needs no device:
it('leaves the condition names to Expo (no `browser` on native)', () => { const config = require(path.join(ROOT, 'metro.config.js')); expect(config.resolver.unstable_conditionNames ?? []).not.toContain('browser'); }); A second one checks that the native entry is the one that would be picked:
function pick(exportsEntry: Record<string, unknown>, conditions: string[]): unknown { const key = Object.keys(exportsEntry).find((k) => conditions.includes(k) || k === 'default'); return key ? exportsEntry[key] : undefined; } it("picks uniwind/components' native build", () => { const conditions = [ ...(config.resolver.unstable_conditionNames ?? ['require', 'import']), 'react-native', ]; expect(pick(uniwind.exports['./components'], conditions)).toBe('./src/components/index.ts'); }); pick is a small copy of the rule, not Metro itself. It is enough to fail when the config or Uniwind's export order changes in a way that matters.
How I missed it
I had a working Uniwind app to compare with, Masareef. I opened its Metro config, looked at the Uniwind wrapper, saw that mine matched and moved on. The broken line was one that the working app did not have. Looking for what to add will not show you what to remove, so diff the whole file.
The other lesson is plainer: a styling migration is not finished until someone has looked at a phone.
Versions
The bug appeared on Expo 58.0.25, React Native 0.88.1, Uniwind 1.13.2 and Tailwind 4. I checked the export order again in Uniwind 1.14.0 and it is unchanged. I have not checked other libraries, but any package that lists browser above react-native is open to the same trap.


