-
Notifications
You must be signed in to change notification settings - Fork 1
/
metro.config.js
33 lines (29 loc) · 925 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
30
31
32
33
const {getDefaultConfig, mergeConfig} = require('@react-native/metro-config');
const {withSentryConfig} = require('@sentry/react-native/metro');
const defaultSourceExts =
require('metro-config/src/defaults/defaults').sourceExts;
const defaultAssetExts =
require('metro-config/src/defaults/defaults').assetExts;
/**
* Metro configuration
* https://reactnative.dev/docs/metro
*
* @type {import('metro-config').MetroConfig}
*/
module.exports = withSentryConfig(
mergeConfig(getDefaultConfig(__dirname), {
transformer: {
babelTransformerPath: require.resolve('react-native-svg-transformer'),
getTransformOptions: async () => ({
transform: {
experimentalImportSupport: false,
inlineRequires: true,
},
}),
},
resolver: {
assetExts: defaultAssetExts.filter(ext => ext !== 'svg'),
sourceExts: [...defaultSourceExts, 'svg'],
},
}),
);