You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
const { getDefaultConfig } = require('metro-config')
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Metro configuration for React Native
|
|
|
|
* https://github.com/facebook/react-native
|
|
|
|
*
|
|
|
|
* @format
|
|
|
|
*/
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
transformer: {
|
|
|
|
getTransformOptions: async () => ({
|
|
|
|
transform: {
|
|
|
|
experimentalImportSupport: false,
|
|
|
|
inlineRequires: true,
|
|
|
|
},
|
|
|
|
}),
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = (async () => {
|
|
|
|
const {
|
|
|
|
resolver: { sourceExts, assetExts },
|
|
|
|
} = await getDefaultConfig(__dirname)
|
|
|
|
return {
|
|
|
|
transformer: {
|
|
|
|
babelTransformerPath: require.resolve(
|
|
|
|
'react-native-svg-transformer',
|
|
|
|
),
|
|
|
|
},
|
|
|
|
resolver: {
|
|
|
|
assetExts: assetExts.filter(ext => ext !== 'svg'),
|
|
|
|
sourceExts: [...sourceExts, 'svg'],
|
|
|
|
},
|
|
|
|
}
|
|
|
|
})()
|