Open CodeSpent opened 3 years ago
I have the same issue, I'm using Shoutem UI 4.4.4 and React Native 0.64.2. Any icons I'm trying to use always throw me a warning message telling that the icon is not provided within the icon set, but the icon I use are listed on the documentation.
Using "@shoutem/ui": "^4.4.8",
and getting same issue with sidebar icon. Wanted to try out this library and got stuck in the first component itself
For now, I needed to combine this configuration with my current metro.config.js
to solve the issue.
Here's my final metro configuration
const { getDefaultConfig } = require('metro-config');
const blacklist = require('metro-config/src/defaults/exclusionList');
module.exports = (async () => {
const {
resolver: { sourceExts, assetExts },
} = await getDefaultConfig();
return {
transformer: {
babelTransformerPath: require.resolve('react-native-svg-transformer'),
experimentalImportSupport: false,
inlineRequires: true,
},
resolver: {
assetExts: assetExts.filter(ext => ext !== 'svg'),
sourceExts: [...sourceExts, 'svg'],
blacklistRE: blacklist([
/node_modules\/.*\/node_modules\/react-native\/.*/,
]),
},
};
})();
Issue with using the
Icon
component. No icons seem to exist by name, but the SVGs are provided in the assets directory.I have tried using a
react-native link
multiple times to no avail.Here is the usage:
I assumed it may have something to do with fonts, but then realized the
Icon
component is just loading those SVGs, but somehow not able to find any?