Skip to content

Commit a3e0223

Browse files
committed
update babel config
1 parent d89c80e commit a3e0223

File tree

4 files changed

+139
-56
lines changed

4 files changed

+139
-56
lines changed

.circleci/config.yml

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ setup_env_file: &setup_env_file
1616
executors:
1717
default:
1818
docker:
19-
- image: cimg/node:22.2.0
19+
- image: cimg/node:22.14.0
2020
working_directory: ~/project
2121

2222
orbs:
@@ -37,7 +37,6 @@ run_on_release: &run_on_release
3737
branches:
3838
ignore: /.*/
3939

40-
4140
commands:
4241
attach_project:
4342
steps:
@@ -50,6 +49,8 @@ jobs:
5049
steps:
5150
- checkout
5251
- attach_project
52+
- node/install:
53+
node-version: 22.14.0
5354

5455
- run:
5556
name: Install dependencies
@@ -114,13 +115,7 @@ jobs:
114115
tag: default
115116
working_directory: ~/project
116117
steps:
117-
- checkout:
118-
path: ~/project
119-
- node/install:
120-
node-version: 22.14.0
121-
122-
- attach_workspace:
123-
at: ~/project
118+
- attach_project
124119

125120
- <<: *setup_env_file
126121

@@ -131,7 +126,7 @@ jobs:
131126
- run:
132127
working_directory: example/test
133128
name: Build android
134-
command: npm run build:android
129+
command: yarn run build:android
135130

136131
- android/create-avd:
137132
avd-name: Android_29
@@ -151,7 +146,7 @@ jobs:
151146
- run:
152147
working_directory: example/test
153148
name: Run UI Tests
154-
command: npm run test:android
149+
command: yarn run test:android
155150

156151
- store_artifacts:
157152
path: ~/.maestro/tests
@@ -161,9 +156,7 @@ jobs:
161156
ios-e2e-test:
162157
<<: *macos_config
163158
steps:
164-
- checkout
165-
- attach_workspace:
166-
at: ~/project
159+
- attach_project
167160

168161
- <<: *setup_env_file
169162

@@ -234,7 +227,6 @@ jobs:
234227
name: Publish the package
235228
command: npm publish
236229

237-
238230
workflows:
239231
version: 2.1
240232
build-and-test:

babel.config.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
11
module.exports = {
2-
presets: ['module:metro-react-native-babel-preset'],
2+
overrides: [
3+
{
4+
exclude: /\/node_modules\//,
5+
presets: ['module:react-native-builder-bob/babel-preset'],
6+
},
7+
{
8+
include: /\/node_modules\//,
9+
presets: ['module:@react-native/babel-preset'],
10+
},
11+
],
312
};

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@
8181
"devDependencies": {
8282
"@expo/config-plugins": "^7.9.1",
8383
"@react-native-community/eslint-config": "3.2.0",
84+
"@react-native/babel-preset": "0.81.0",
8485
"@react-native/typescript-config": "0.73.1",
8586
"@types/jest": "29.5.12",
8687
"@types/react": "18.2.6",
@@ -94,7 +95,7 @@
9495
"prettier": "3.0.0",
9596
"react": "18.2.0",
9697
"react-native": "^0.81.0",
97-
"react-native-builder-bob": "^0.40.13",
98+
"react-native-builder-bob": "0.40.13",
9899
"typescript": "5.0.4"
99100
},
100101
"peerDependencies": {

0 commit comments

Comments
 (0)