Skip to content

Instantly share code, notes, and snippets.

@lucascardial
Created January 27, 2020 18:50
Show Gist options
  • Save lucascardial/168172aba30260067aa77d09635a36a8 to your computer and use it in GitHub Desktop.
Save lucascardial/168172aba30260067aa77d09635a36a8 to your computer and use it in GitHub Desktop.
react-native-svg
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'],
},
};
})();
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment