-
Notifications
You must be signed in to change notification settings - Fork 0
/
metro.config.js
25 lines (22 loc) · 997 Bytes
/
metro.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Learn more https://docs.expo.io/guides/customizing-metro
const { getDefaultConfig } = require('expo/metro-config');
// Absolute path to your package
// This is so we import the api directly so we can tRPC types as soon as we modify them
const packagePath =
'/Users/jyan/Documents/api';
module.exports = (async () => {
const current = getDefaultConfig(__dirname);
return {
...current,
resolver: {
...current.resolver,
nodeModulesPath: [packagePath], // https://facebook.github.io/metro/docs/configuration/#nodemodulespaths
assetExts: current.resolver.assetExts.filter(ext => ext !== 'svg'), // 2: https://blog.logrocket.com/how-to-use-svgs-react-native-tutorial-with-examples/
sourceExts: [...current.resolver.sourceExts, 'svg'], // 2
},
watchFolders: [packagePath],
transformer: {
babelTransformerPath: require.resolve('react-native-svg-transformer') // 2
},
}
})();