Skip to content

Commit

Permalink
Add back react-native-svg Metro config
Browse files Browse the repository at this point in the history
  • Loading branch information
leotm committed Apr 4, 2023
1 parent d8f7279 commit 0030f60
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions metro.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
})();

0 comments on commit 0030f60

Please sign in to comment.