Skip to content

Instantly share code, notes, and snippets.

@hieptlccc
Created May 10, 2022 09:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hieptlccc/45c6f2a1aab0b3fc86176b2983b6bf4b to your computer and use it in GitHub Desktop.
Save hieptlccc/45c6f2a1aab0b3fc86176b2983b6bf4b to your computer and use it in GitHub Desktop.
react native chat app - metro.config.js
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'],
},
};
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment