this repo has no description
at main 1.1 kB view raw
1// Learn more https://docs.expo.io/guides/customizing-metro 2const { getDefaultConfig } = require('expo/metro-config') 3const path = require('path') 4 5const config = getDefaultConfig(__dirname) 6 7// npm v7+ will install ../node_modules/react and ../node_modules/react-native because of peerDependencies. 8// To prevent the incompatible react-native between ./node_modules/react-native and ../node_modules/react-native, 9// excludes the one from the parent folder when bundling. 10config.resolver.blockList = [ 11 ...Array.from(config.resolver.blockList ?? []), 12 new RegExp(path.resolve('..', 'node_modules', 'react')), 13 new RegExp(path.resolve('..', 'node_modules', 'react-native')), 14] 15 16config.resolver.nodeModulesPaths = [ 17 path.resolve(__dirname, './node_modules'), 18 path.resolve(__dirname, '../node_modules'), 19] 20 21config.resolver.extraNodeModules = { 22 'expo-atproto-auth': '..', 23} 24 25config.watchFolders = [path.resolve(__dirname, '..')] 26 27config.transformer.getTransformOptions = async () => ({ 28 transform: { 29 experimentalImportSupport: false, 30 inlineRequires: true, 31 }, 32}) 33 34module.exports = config