-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmetro.config.js
29 lines (27 loc) · 966 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
26
27
28
29
const {getSentryExpoConfig} = require('@sentry/react-native/metro');
/** @type {import('expo/metro-config').MetroConfig} */
const config = getSentryExpoConfig(__dirname);
const defaultBlockList = Array.isArray(config.resolver.blockList)
? config.resolver.blockList
: [config.resolver.blockList];
module.exports = {
...config,
transformer: {
...config.transformer,
// For https://github.com/kristerkari/react-native-svg-transformer
babelTransformerPath: require.resolve('react-native-svg-transformer'),
},
resolver: {
...config.resolver,
// For nodejs-mobile
blockList: [
...defaultBlockList,
/nodejs-assets\/.*/,
// TODO: Update comapeo-schema to make ajv a dev-dep
/node_modules\/ajv\/.*/,
],
// For https://github.com/kristerkari/react-native-svg-transformer
assetExts: config.resolver.assetExts.filter(ext => ext !== 'svg'),
sourceExts: [...config.resolver.sourceExts, 'svg'],
},
};