-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f09ee24
commit 60cb301
Showing
1 changed file
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// Learn more https://docs.expo.io/guides/customizing-metro | ||
const { getDefaultConfig } = require('expo/metro-config') | ||
const path = require('path') | ||
|
||
const config = getDefaultConfig(__dirname) | ||
// const extraNodeModules = require('node-libs-browser') | ||
// config.resolver.extraNodeModules = extraNodeModules | ||
// npm v7+ will install ../node_modules/react-native because of peerDependencies. | ||
// To prevent the incompatible react-native bewtween ./node_modules/react-native and ../node_modules/react-native, | ||
// excludes the one from the parent folder when bundling. | ||
config.resolver.blockList = [ | ||
...Array.from(config.resolver.blockList ?? []), | ||
new RegExp(path.resolve('..', 'node_modules', 'react-native')), | ||
] | ||
|
||
config.resolver.nodeModulesPaths = [ | ||
path.resolve(__dirname, './node_modules'), | ||
path.resolve(__dirname, '../node_modules'), | ||
] | ||
|
||
config.resolver.extraNodeModules = { | ||
'xmtp-react-native-sdk': '..' | ||
} | ||
|
||
config.watchFolders = [path.resolve(__dirname, '..')] | ||
|
||
config.transformer.getTransformOptions = async () => ({ | ||
transform: { | ||
experimentalImportSupport: false, | ||
inlineRequires: true, | ||
}, | ||
}) | ||
|
||
module.exports = config |