Skip to content

Commit 23d2f3c

Browse files
committed
fix: switch to @react-native/babel-preset and moduleResolution node for RN 0.76
Made-with: Cursor
1 parent a7a8877 commit 23d2f3c

File tree

4 files changed

+8
-175
lines changed

4 files changed

+8
-175
lines changed

babel.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module.exports = {
2-
presets: ["module:metro-react-native-babel-preset"],
2+
presets: ["module:@react-native/babel-preset"],
33
plugins: [
44
[
55
"module-resolver",

package-lock.json

Lines changed: 3 additions & 169 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@
6363
"@commitlint/config-conventional": "^19.5.0",
6464
"@testing-library/react-native": "^13.0.0",
6565
"@types/jest": "^29.5.13",
66+
"@react-native/babel-preset": "^0.76.0",
6667
"@types/react": "^18.3.7",
67-
"@types/react-native": "^0.73.0",
6868
"@typescript-eslint/eslint-plugin": "^8.6.0",
6969
"@typescript-eslint/parser": "^8.6.0",
7070
"babel-jest": "^29.7.0",
@@ -84,7 +84,6 @@
8484
"jest": "^29.7.0",
8585
"jest-environment-jsdom": "^29.7.0",
8686
"lint-staged": "^15.2.10",
87-
"metro-react-native-babel-preset": "^0.77.0",
8887
"ora": "^8.0.1",
8988
"prompts": "^2.4.2",
9089
"prettier": "^3.3.3",
@@ -116,7 +115,7 @@
116115
],
117116
"testRegex": "(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$",
118117
"transformIgnorePatterns": [
119-
"node_modules/(?!(react-native|@react-native|@testing-library)/)"
118+
"node_modules/(?!(react-native|@react-native/.*|@react-native-community/.*|@testing-library)/)"
120119
],
121120
"collectCoverageFrom": [
122121
"src/**/*.{ts,tsx}",

tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"noUnusedParameters": true,
1515
"noImplicitReturns": true,
1616
"noFallthroughCasesInSwitch": true,
17-
"moduleResolution": "bundler",
17+
"moduleResolution": "node",
1818
"baseUrl": "./",
1919
"paths": {
2020
"@/*": ["src/*"]
@@ -25,7 +25,7 @@
2525
"isolatedModules": true,
2626
"skipLibCheck": true,
2727
"experimentalDecorators": true,
28-
"typeRoots": ["./node_modules/@types", "./@types"]
28+
"typeRoots": ["./node_modules/@types"]
2929
},
3030
"include": ["src"],
3131
"exclude": ["node_modules", "lib", "build"]

0 commit comments

Comments
 (0)