This how I have imported
import Detail_R_Arrow from '../assets/images/detailRarrow.svg';
export {
Back_Arrow,}
This is my import statement
import SvgUri from 'react-native-svg-uri';
This how I have defined
<SvgUri
source={Nsettings_Image}
/>
This is my metro Config File
const {getDefaultConfig, mergeConfig} = require('@react-native/metro-config');
const config = {};
module.exports = mergeConfig(getDefaultConfig(__dirname), config);
I have tried this config also
const { getDefaultConfig } = require('metro-config');
module.exports = (async () => {
const {
resolver: { sourceExts, assetExts },
} = await getDefaultConfig();
return {
transformer: {
babelTransformerPath: require.resolve('react-native-svg-transformer'),
},
resolver: {
assetExts: assetExts.filter(ext => ext !== 'svg'),
sourceExts: [...sourceExts, 'svg', 'png', 'jpg', 'jpeg', 'gif'],
},
};
})();
but it doesn’t works
only via connected in usb its work but once I taken as APK I cant see the SVG images what should I do
Nikash K is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.