Skip to content
This repository was archived by the owner on Nov 3, 2025. It is now read-only.

Commit 097cf40

Browse files
committed
🔧 (example) fix example app launching
`react-native run-[ios/android]` is working again.
1 parent 158fcb4 commit 097cf40

4 files changed

Lines changed: 3585 additions & 26 deletions

File tree

example/jest.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ module.exports = {
44
moduleDirectories: ['node_modules', 'example/node_modules'],
55
rootDir: '..',
66
testPathIgnorePatterns: ['/node_modules/', '<rootDir>/src/'],
7+
modulePathIgnorePatterns: ['<rootDir>/example/node_modules/react-native/'],
78
};

example/metro.config.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,15 @@
66
*/
77

88
const path = require('path');
9+
const blacklist = require('metro-config/src/defaults/blacklist');
10+
11+
const rootPath = path.resolve(__dirname, '..');
912

1013
module.exports = {
1114
projectRoot: path.resolve(__dirname),
1215
watchFolders: [path.resolve(__dirname, '../src'), path.resolve(__dirname, '../node_modules')],
1316
resolver: {
17+
blacklistRE: blacklist([new RegExp(`${rootPath}/node_modules/react-native/.*`)]),
1418
extraNodeModules: {
1519
'react-gondola': path.resolve(__dirname, '../src'),
1620
// Important, those are all the dependencies
@@ -21,8 +25,11 @@ module.exports = {
2125
'mobx-react': path.resolve(__dirname, '../node_modules/mobx-react'),
2226
'mobx-utils': path.resolve(__dirname, '../node_modules/mobx-utils'),
2327
react: path.resolve(__dirname, '../node_modules/react'),
24-
'react-native': path.resolve(__dirname, '../node_modules/react-native'),
25-
'@babel/plugin-proposal-decorators': path.resolve(__dirname, '../node_modules/@babel/plugin-proposal-decorators'),
28+
'react-native': path.resolve(__dirname, 'node_modules/react-native'),
29+
'@babel/plugin-proposal-decorators': path.resolve(
30+
__dirname,
31+
'../node_modules/@babel/plugin-proposal-decorators'
32+
),
2633
},
2734
},
2835
transformer: {

example/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"@babel/runtime": "^7.4.5",
1919
"babel-plugin-module-resolver": "^3.2.0",
2020
"metro-react-native-babel-preset": "^0.54.0",
21+
"react-native": "0.59.5",
2122
"typescript": "^3.5.1"
2223
}
2324
}

0 commit comments

Comments
 (0)