The withUniwindConfig function configures Uniwind in your Metro bundler. This is required to enable CSS processing, type generation, and theme support in your React Native application.
All Metro configuration changes require a Metro bundler restart to take effect. Clear the cache with npx expo start --clear if you encounter issues.
The relative path to your CSS entry file from the project root. This file should contain your Tailwind imports and custom CSS.
Important: The location of your CSS entry file determines the app root - Tailwind will automatically scan for classNames starting from this directory. Files outside this directory require the @source directive in your CSS file.
@import 'tailwindcss';@import 'uniwind';/* Your custom CSS and themes */
Keep your CSS entry file in the root of your application folder (e.g., src, app). If you have components outside this folder, use @source to include them. See the monorepo guide for details.
The path where Uniwind will auto-generate TypeScript type definitions for your CSS classes and themes. Defaults to ./uniwind-types.d.ts in your project root.
Place the .d.ts file in your src or app directory for automatic TypeScript inclusion. For custom paths outside these directories, add the file to your tsconfig.json.
TypeScript configuration:
tsconfig.json
Copy
Ask AI
{ "compilerOptions": { // ... }, "include": [ // ... "./uniwind-types.d.ts" // If placed in project root ]}
Enable debug mode to identify unsupported CSS properties and classNames. When enabled, Uniwind will log errors for web-specific CSS that doesn’t work in React Native.
Uniwind Error [CSS Processor] - Unsupported value type - "filters" for className headerBlur
Enable debug mode during development if you’re experiencing styling issues or migrating from web. It helps catch web-specific CSS properties that aren’t supported in React Native.