Skip to content

Commit cf07cde

Browse files
Merge pull request #890 from Iterable/feature/SDK-122-upgrade-react-native-builder-bob
[SDK-122]: Upgrade react-native-builder-bob to 0.43
2 parents 854ab7c + a82b0fc commit cf07cde

5 files changed

Lines changed: 1561 additions & 931 deletions

File tree

example/metro.config.js

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
11
const path = require('path');
22
const { getDefaultConfig } = require('@react-native/metro-config');
3-
const { getConfig } = require('react-native-builder-bob/metro-config');
4-
const pkg = require('../package.json');
5-
6-
const root = path.resolve(__dirname, '..');
3+
const { withMetroConfig } = require('react-native-monorepo-config');
74

85
/**
96
* Metro configuration
107
* https://facebook.github.io/metro/docs/configuration
118
*
129
* @type {import('@react-native/metro-config').MetroConfig}
1310
*/
14-
module.exports = getConfig(getDefaultConfig(__dirname), {
15-
root,
16-
pkg,
17-
project: __dirname,
11+
module.exports = withMetroConfig(getDefaultConfig(__dirname), {
12+
root: path.resolve(__dirname, '..'),
13+
dirname: __dirname,
14+
conditions: ['iterable-react-native-sdk-source'],
1815
});

example/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,9 @@
3636
"@types/jest": "^29.5.13",
3737
"@types/react": "^19.2.0",
3838
"@types/react-test-renderer": "^19.1.0",
39-
"react-native-builder-bob": "^0.30.2",
39+
"react-native-builder-bob": "^0.43.0",
4040
"react-native-dotenv": "^3.4.11",
41+
"react-native-monorepo-config": "^0.4.0",
4142
"react-test-renderer": "19.2.3"
4243
},
4344
"engines": {

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
"name": "@iterable/react-native-sdk",
33
"version": "3.1.0",
44
"description": "Iterable SDK for React Native.",
5-
"source": "./src/index.tsx",
65
"main": "./lib/module/index.js",
76
"types": "./lib/typescript/src/index.d.ts",
87
"exports": {
98
".": {
9+
"iterable-react-native-sdk-source": "./src/index.tsx",
1010
"types": "./lib/typescript/src/index.d.ts",
1111
"default": "./lib/module/index.js"
1212
},
@@ -98,7 +98,7 @@
9898
"prettier-eslint": "^16.4.2",
9999
"react": "19.2.3",
100100
"react-native": "0.85.3",
101-
"react-native-builder-bob": "^0.40.4",
101+
"react-native-builder-bob": "^0.43.0",
102102
"react-native-gesture-handler": "^2.30.0",
103103
"react-native-safe-area-context": "^5.6.0",
104104
"react-native-screens": ">=4.19.0 <4.25.0",

tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"paths": {
55
"@iterable/react-native-sdk": ["./src/index"]
66
},
7+
"customConditions": ["iterable-react-native-sdk-source"],
78
"allowUnreachableCode": false,
89
"allowUnusedLabels": false,
910
"esModuleInterop": true,

0 commit comments

Comments
 (0)