From 0030f6031ab4d8de78d94301283d363767c00d11 Mon Sep 17 00:00:00 2001 From: LeoTM <1881059+leotm@users.noreply.github.com> Date: Tue, 4 Apr 2023 16:54:35 +0100 Subject: [PATCH] Add back react-native-svg Metro config --- metro.config.js | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/metro.config.js b/metro.config.js index dd8ba1a7b97..1c44b370620 100644 --- a/metro.config.js +++ b/metro.config.js @@ -16,23 +16,24 @@ module.exports = (async () => { transformer: { getTransformOptions: async () => ({ transform: { - experimentalImportSupport: false, + experimentalImportSupport: true, inlineRequires: true, }, }), -// babelTransformerPath: require.resolve('react-native-svg-transformer'), -// assetPlugins: ['react-native-svg-asset-plugin'], -// svgAssetPlugin: { -// pngCacheDir: '.png-cache', -// scales: [1], -// output: { -// compressionLevel: 6, -// }, -// }, + babelTransformerPath: require.resolve('react-native-svg-transformer'), + assetPlugins: ['react-native-svg-asset-plugin'], + svgAssetPlugin: { + pngCacheDir: '.png-cache', + scales: [1], + output: { + compressionLevel: 6, + }, + }, }, resolver: { assetExts: assetExts.filter((ext) => ext !== 'svg'), sourceExts: [...sourceExts, 'svg'], }, + maxWorkers: 2, }; })();