-
Notifications
You must be signed in to change notification settings - Fork 0
feat: added nativewind #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
ac6742d
5aab8be
a673303
7879018
9263422
9b1afc7
86fb3ad
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| module.exports = function (api) { | ||
| api.cache(true); | ||
| return { | ||
| presets: [ | ||
| ["babel-preset-expo", { jsxImportSource: "nativewind" }], | ||
| "nativewind/babel", | ||
| ], | ||
| }; | ||
| }; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| @tailwind base; | ||
| @tailwind components; | ||
| @tailwind utilities; | ||
|
|
||
| @font-face { | ||
| font-family: 'Roboto Flex'; | ||
| /* Update the url path to point exactly to where your font file lives */ | ||
| src: url('./assets/fonts/Roboto-Flex.ttf') format('truetype'); | ||
| font-weight: 100 1000; /* Roboto Flex is a variable font, so you can define the weight range */ | ||
| font-style: normal; | ||
| font-display: swap; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| // Learn more https://docs.expo.io/guides/customizing-metro | ||
| const { getDefaultConfig } = require('expo/metro-config'); | ||
| const { withNativeWind } = require('nativewind/metro'); | ||
| const { | ||
| wrapWithReanimatedMetroConfig, | ||
| } = require('react-native-reanimated/metro-config'); | ||
|
|
||
| /** @type {import('expo/metro-config').MetroConfig} */ | ||
| const config = getDefaultConfig(__dirname); | ||
|
|
||
| module.exports = wrapWithReanimatedMetroConfig(withNativeWind(config, { input: './global.css' })); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| /// <reference types="nativewind/types" /> | ||
|
|
||
| // NOTE: This file should not be edited and should be committed with your source code. It is generated by NativeWind. |
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -27,21 +27,24 @@ | |||||||||
| "expo-symbols": "~1.0.8", | ||||||||||
| "expo-system-ui": "~6.0.9", | ||||||||||
| "expo-web-browser": "~15.0.10", | ||||||||||
| "nativewind": "^4.2.1", | ||||||||||
| "prettier-plugin-tailwindcss": "^0.5.14", | ||||||||||
| "react": "19.1.0", | ||||||||||
|
Comment on lines
+31
to
32
|
||||||||||
| "react-dom": "19.1.0", | ||||||||||
| "react-native": "0.81.5", | ||||||||||
| "react-native-gesture-handler": "~2.28.0", | ||||||||||
| "react-native-worklets": "0.5.1", | ||||||||||
| "react-native-reanimated": "~4.1.1", | ||||||||||
| "react-native-safe-area-context": "~5.6.0", | ||||||||||
| "react-native-reanimated": "^4.1.1", | ||||||||||
| "react-native-safe-area-context": "^5.4.0", | ||||||||||
|
Comment on lines
+36
to
+37
|
||||||||||
| "react-native-reanimated": "^4.1.1", | |
| "react-native-safe-area-context": "^5.4.0", | |
| "react-native-reanimated": "~4.1.1", | |
| "react-native-safe-area-context": "~5.6.0", |
Copilot
AI
Mar 23, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tailwindcss is used for build-time styling generation (NativeWind), not at runtime in the app bundle. Consider moving it to devDependencies to keep runtime dependencies minimal (unless you have a specific production-install requirement).
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| /** @type {import('tailwindcss').Config} */ | ||
| module.exports = { | ||
| content: ['./components/**/*.{js,jsx,ts,tsx}', './app/**/*.{js,jsx,ts,tsx}'], | ||
| theme: { | ||
| extend: {}, | ||
| }, | ||
| presets: [require('nativewind/preset')], | ||
| plugins: [], | ||
| }; | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,6 +12,7 @@ | |
| "**/*.ts", | ||
| "**/*.tsx", | ||
| ".expo/types/**/*.ts", | ||
| "expo-env.d.ts" | ||
| "expo-env.d.ts", | ||
| "nativewind-env.d.ts" | ||
| ] | ||
| } | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The newly added JSX block’s indentation is inconsistent with surrounding children of
ParallaxScrollView, which makes the structure harder to read. Re-indent this block to match the rest of the file’s formatting.