aboutsummaryrefslogtreecommitdiff
path: root/metro.config.js
diff options
context:
space:
mode:
Diffstat (limited to 'metro.config.js')
-rw-r--r--metro.config.js22
1 files changed, 16 insertions, 6 deletions
diff --git a/metro.config.js b/metro.config.js
index 13a96421..8d872624 100644
--- a/metro.config.js
+++ b/metro.config.js
@@ -5,13 +5,23 @@
* @format
*/
-module.exports = {
- transformer: {
- getTransformOptions: async () => ({
+const {getDefaultConfig} = require('metro-config');
+
+module.exports = (async () => {
+ const {
+ resolver: {sourceExts, assetExts},
+ } = await getDefaultConfig();
+ return {
+ transformer: {
transform: {
experimentalImportSupport: false,
inlineRequires: false,
},
- }),
- },
-};
+ babelTransformerPath: require.resolve('react-native-svg-transformer'),
+ },
+ resolver: {
+ assetExts: assetExts.filter((ext) => ext !== 'svg'),
+ sourceExts: [...sourceExts, 'svg'],
+ },
+ };
+})();