metro.config.js 473 B

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