Skip to content
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

chore: Upgrade nativewind to v4 #10

Merged
merged 1 commit into from
May 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import 'react-native-gesture-handler';
import React from 'react';
import { SafeAreaProvider } from 'react-native-safe-area-context';

import './global.css';
import { Navigator } from './src/navigations/Navigator';
import { AppProviders } from './src/providers/AppProviders';

Expand Down
3 changes: 1 addition & 2 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = {
presets: ['module:@react-native/babel-preset'],
presets: ['module:@react-native/babel-preset', 'nativewind/babel'],
plugins: [
[
'module-resolver',
Expand All @@ -8,7 +8,6 @@ module.exports = {
extensions: ['.ios.ts', '.ios.tsx', '.android.ts', '.android.tsx', '.ts', '.tsx', '.js', '.jsx', '.json'],
},
],
'nativewind/babel',
[
'transform-inline-environment-variables',
{
Expand Down
3 changes: 3 additions & 0 deletions global.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
13 changes: 7 additions & 6 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1131,19 +1131,20 @@ PODS:
- React-Core
- RNDateTimePicker (7.6.4):
- React-Core
- RNGestureHandler (2.14.0):
- RNGestureHandler (2.16.0):
- glog
- RCT-Folly (= 2022.05.16.00)
- React-Core
- RNReanimated (3.6.1):
- RNReanimated (3.8.1):
- glog
- RCT-Folly (= 2022.05.16.00)
- React-Core
- ReactCommon/turbomodule/core
- RNScreens (3.29.0):
- RNScreens (3.31.1):
- glog
- RCT-Folly (= 2022.05.16.00)
- React-Core
- React-RCTImage
- SocketRocket (0.6.1)
- Yoga (1.14.0)

Expand Down Expand Up @@ -1434,9 +1435,9 @@ SPEC CHECKSUMS:
ReactCommon: 2aa35648354bd4c4665b9a5084a7d37097b89c10
RNCAsyncStorage: 826b603ae9c0f88b5ac4e956801f755109fa4d5c
RNDateTimePicker: 08f00a2c341bf96e4b30da15799fbdd4c5fa48a3
RNGestureHandler: a4c4561307e67f2942f5a4fe1526ff78cf3f5280
RNReanimated: dee37576492f1a375017515f5c77e66e5eec696b
RNScreens: 17e2f657f1b09a71ec3c821368a04acbb7ebcb46
RNGestureHandler: bc2cdb2dc42facdf34992ae364b8a728e19a3686
RNReanimated: 8a4d86eb951a4a99d8e86266dc71d7735c0c30a9
RNScreens: 134a7511b12b8eb440b87aac21e36a71295d6024
SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17
Yoga: 805bf71192903b20fc14babe48080582fee65a80

Expand Down
7 changes: 4 additions & 3 deletions metro.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const { getDefaultConfig, mergeConfig } = require('@react-native/metro-config');
const { generate } = require('@storybook/react-native/scripts/generate');
const { withNativeWind } = require('nativewind/metro');

const path = require('path');

Expand All @@ -13,11 +14,11 @@ generate({
*
* @type {import('metro-config').MetroConfig}
*/
const config = {
const config = mergeConfig(getDefaultConfig(__dirname), {
transformer: {
// Required by Storybook
unstable_allowRequireContext: true,
},
};
});

module.exports = mergeConfig(getDefaultConfig(__dirname), config);
module.exports = withNativeWind(config, { input: './global.css' });
File renamed without changes.
13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,20 @@
"@tanstack/react-query": "^4.36.1",
"axios": "^1.6.2",
"fast-text-encoding": "^1.0.6",
"nativewind": "^2.0.11",
"nativewind": "^4.0.36",
"qs": "^6.11.2",
"react": "18.2.0",
"react-intl": "^6.5.1",
"react-native": "0.73.6",
"react-native-config": "^1.5.1",
"react-native-drawer-layout": "^3.2.2",
"react-native-gesture-handler": "^2.14.0",
"react-native-gesture-handler": "^2.16.0",
"react-native-mmkv": "^2.11.0",
"react-native-reanimated": "^3.6.1",
"react-native-reanimated": "^3.8.1",
"react-native-safe-area-context": "^4.7.4",
"react-native-screens": "^3.27.0",
"react-native-url-polyfill": "^2.0.0"
"react-native-screens": "^3.31.1",
"react-native-url-polyfill": "^2.0.0",
"tailwind-merge": "^2.3.0"
},
"devDependencies": {
"@babel/core": "^7.23.2",
Expand Down Expand Up @@ -81,7 +82,7 @@
"prettier": "2.8.8",
"react-dom": "18.2.0",
"react-test-renderer": "18.2.0",
"tailwindcss": "3.3.2",
"tailwindcss": "3.4.3",
"ts-jest": "^29.1.1",
"typescript": "5.0.4"
},
Expand Down
243 changes: 0 additions & 243 deletions patches/nativewind+2.0.11.patch

This file was deleted.

Loading
Loading