npx create-expo-app --example with-nativewind
→ Examples: List of --example
starters
→ Alternative: Tutorial for starter & manual installation by NativeWind
https://www.nativewind.dev/getting-started/installation
babel.config.js
behind the scenes and let's you optionally opt-out by simply creating your own file in the root of your app:// babel.config.js (default)
module.exports = function (api) {
api.cache(true);
return {
presets: ['babel-preset-expo'],
};
};
// babel.config.js (nativewind)
module.exports = function (api) {
api.cache(true);
return {
presets: [
["babel-preset-expo", { jsxImportSource: "nativewind" }],
"nativewind/babel",
],
};
};
→ You need also to create a metro.config.js
if deciding to manually install NativeWind, this file is also handled by Expo behind the scenes and you can opt-out by creating your own file.
Alternative starter & Manual installation guide by NativeWind