Skip to content

Commit 4d5cef5

Browse files
committed
chore: Upgrade nativewind to v4
1 parent 066629a commit 4d5cef5

File tree

14 files changed

+361
-445
lines changed

14 files changed

+361
-445
lines changed

App.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import 'react-native-gesture-handler';
22
import React from 'react';
33
import { SafeAreaProvider } from 'react-native-safe-area-context';
44

5+
import './global.css';
56
import { Navigator } from './src/navigations/Navigator';
67
import { AppProviders } from './src/providers/AppProviders';
78

babel.config.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module.exports = {
2-
presets: ['module:@react-native/babel-preset'],
2+
presets: ['module:@react-native/babel-preset', 'nativewind/babel'],
33
plugins: [
44
[
55
'module-resolver',
@@ -8,7 +8,6 @@ module.exports = {
88
extensions: ['.ios.ts', '.ios.tsx', '.android.ts', '.android.tsx', '.ts', '.tsx', '.js', '.jsx', '.json'],
99
},
1010
],
11-
'nativewind/babel',
1211
[
1312
'transform-inline-environment-variables',
1413
{

global.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
@tailwind base;
2+
@tailwind components;
3+
@tailwind utilities;

ios/Podfile.lock

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1131,19 +1131,20 @@ PODS:
11311131
- React-Core
11321132
- RNDateTimePicker (7.6.4):
11331133
- React-Core
1134-
- RNGestureHandler (2.14.0):
1134+
- RNGestureHandler (2.16.0):
11351135
- glog
11361136
- RCT-Folly (= 2022.05.16.00)
11371137
- React-Core
1138-
- RNReanimated (3.6.1):
1138+
- RNReanimated (3.8.1):
11391139
- glog
11401140
- RCT-Folly (= 2022.05.16.00)
11411141
- React-Core
11421142
- ReactCommon/turbomodule/core
1143-
- RNScreens (3.29.0):
1143+
- RNScreens (3.31.1):
11441144
- glog
11451145
- RCT-Folly (= 2022.05.16.00)
11461146
- React-Core
1147+
- React-RCTImage
11471148
- SocketRocket (0.6.1)
11481149
- Yoga (1.14.0)
11491150

@@ -1434,9 +1435,9 @@ SPEC CHECKSUMS:
14341435
ReactCommon: 2aa35648354bd4c4665b9a5084a7d37097b89c10
14351436
RNCAsyncStorage: 826b603ae9c0f88b5ac4e956801f755109fa4d5c
14361437
RNDateTimePicker: 08f00a2c341bf96e4b30da15799fbdd4c5fa48a3
1437-
RNGestureHandler: a4c4561307e67f2942f5a4fe1526ff78cf3f5280
1438-
RNReanimated: dee37576492f1a375017515f5c77e66e5eec696b
1439-
RNScreens: 17e2f657f1b09a71ec3c821368a04acbb7ebcb46
1438+
RNGestureHandler: bc2cdb2dc42facdf34992ae364b8a728e19a3686
1439+
RNReanimated: 8a4d86eb951a4a99d8e86266dc71d7735c0c30a9
1440+
RNScreens: 134a7511b12b8eb440b87aac21e36a71295d6024
14401441
SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17
14411442
Yoga: 805bf71192903b20fc14babe48080582fee65a80
14421443

metro.config.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
const { getDefaultConfig, mergeConfig } = require('@react-native/metro-config');
22
const { generate } = require('@storybook/react-native/scripts/generate');
3+
const { withNativeWind } = require('nativewind/metro');
34

45
const path = require('path');
56

@@ -13,11 +14,11 @@ generate({
1314
*
1415
* @type {import('metro-config').MetroConfig}
1516
*/
16-
const config = {
17+
const config = mergeConfig(getDefaultConfig(__dirname), {
1718
transformer: {
1819
// Required by Storybook
1920
unstable_allowRequireContext: true,
2021
},
21-
};
22+
});
2223

23-
module.exports = mergeConfig(getDefaultConfig(__dirname), config);
24+
module.exports = withNativeWind(config, { input: './global.css' });
File renamed without changes.

package.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,20 @@
3030
"@tanstack/react-query": "^4.36.1",
3131
"axios": "^1.6.2",
3232
"fast-text-encoding": "^1.0.6",
33-
"nativewind": "^2.0.11",
33+
"nativewind": "^4.0.36",
3434
"qs": "^6.11.2",
3535
"react": "18.2.0",
3636
"react-intl": "^6.5.1",
3737
"react-native": "0.73.6",
3838
"react-native-config": "^1.5.1",
3939
"react-native-drawer-layout": "^3.2.2",
40-
"react-native-gesture-handler": "^2.14.0",
40+
"react-native-gesture-handler": "^2.16.0",
4141
"react-native-mmkv": "^2.11.0",
42-
"react-native-reanimated": "^3.6.1",
42+
"react-native-reanimated": "^3.8.1",
4343
"react-native-safe-area-context": "^4.7.4",
44-
"react-native-screens": "^3.27.0",
45-
"react-native-url-polyfill": "^2.0.0"
44+
"react-native-screens": "^3.31.1",
45+
"react-native-url-polyfill": "^2.0.0",
46+
"tailwind-merge": "^2.3.0"
4647
},
4748
"devDependencies": {
4849
"@babel/core": "^7.23.2",
@@ -81,7 +82,7 @@
8182
"prettier": "2.8.8",
8283
"react-dom": "18.2.0",
8384
"react-test-renderer": "18.2.0",
84-
"tailwindcss": "3.3.2",
85+
"tailwindcss": "3.4.3",
8586
"ts-jest": "^29.1.1",
8687
"typescript": "5.0.4"
8788
},

patches/nativewind+2.0.11.patch

Lines changed: 0 additions & 243 deletions
This file was deleted.

0 commit comments

Comments
 (0)