Unverified Commit 65ba0c47 authored by Dylan Vann's avatar Dylan Vann Committed by GitHub

Make yarn link work with example project. (#323)

parent 69678767
......@@ -4,6 +4,6 @@ project(':react-native-vector-icons').projectDir = new File(rootProject.projectD
include ':react-native-image-picker'
project(':react-native-image-picker').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-image-picker/android')
include ':react-native-fast-image'
project(':react-native-fast-image').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-fast-image/android')
project(':react-native-fast-image').projectDir = new File(rootProject.projectDir, '../../android')
include ':app'
......@@ -1427,7 +1427,7 @@
DEAD_CODE_STRIPPING = NO;
HEADER_SEARCH_PATHS = (
"$(inherited)",
"$(SRCROOT)/../node_modules/react-native-fast-image/ios/FastImage/**",
"$(SRCROOT)/../../ios",
"$(SRCROOT)/../node_modules/react-native-image-picker/ios",
"$(SRCROOT)/../node_modules/react-native-vector-icons/RNVectorIconsManager",
);
......@@ -1451,7 +1451,7 @@
CURRENT_PROJECT_VERSION = 1;
HEADER_SEARCH_PATHS = (
"$(inherited)",
"$(SRCROOT)/../node_modules/react-native-fast-image/ios/FastImage/**",
"$(SRCROOT)/../../ios",
"$(SRCROOT)/../node_modules/react-native-image-picker/ios",
"$(SRCROOT)/../node_modules/react-native-vector-icons/RNVectorIconsManager",
);
......
const path = require('path')
const extraNodeModules = {
'prop-types': path.resolve(__dirname, 'node_modules/prop-types'),
react: path.resolve(__dirname, 'node_modules/react'),
'react-native': path.resolve(__dirname, 'node_modules/react-native'),
}
const blacklistPath = path.resolve(__dirname, '../node_modules/react-native')
const blacklistRegexes = [new RegExp(`${blacklistPath}/.*`)]
const watchFolder = path.resolve(__dirname, '../')
const watchFolders = [watchFolder]
const metroVersion = require('metro/package.json').version
const metroVersionComponents = metroVersion.match(/^(\d+)\.(\d+)\.(\d+)/)
if (
metroVersionComponents[1] === '0' &&
parseInt(metroVersionComponents[2], 10) >= 43
) {
module.exports = {
resolver: {
extraNodeModules,
blacklistRE: require('metro-config/src/defaults/blacklist')(
blacklistRegexes,
),
},
watchFolders,
}
} else {
module.exports = {
extraNodeModules,
getBlacklistRE: () => require('metro/src/blacklist')(blacklistRegexes),
getProjectRoots: () => [path.resolve(__dirname)].concat(watchFolders),
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment