metro.config.js 416 B

12345678910111213141516
  1. const { getDefaultConfig } = require('metro-config');
  2. module.exports = (async () => {
  3. const {
  4. resolver: { sourceExts, assetExts },
  5. } = await getDefaultConfig();
  6. return {
  7. transformer: {
  8. babelTransformerPath: require.resolve('react-native-svg-transformer'),
  9. },
  10. resolver: {
  11. assetExts: assetExts.filter(ext => ext !== 'svg'),
  12. sourceExts: [...sourceExts, 'svg'],
  13. },
  14. };
  15. })();