Closed dungpasoftware closed 1 year ago
Currently, when I upgraded to version 0.72.0. The metro.config.js file looks like that
const {getDefaultConfig, mergeConfig} = require('@react-native/metro-config'); /** * Metro configuration * https://facebook.github.io/metro/docs/configuration * * @type {import('metro-config').MetroConfig} */ const config = {}; module.exports = mergeConfig(getDefaultConfig(__dirname), config);
And I don't know how to put the metro setup into the config. I tried to put the async() function into config, but it couldn't finds the assetExts.filter.
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"] } };
fixed in this issue: https://github.com/kristerkari/react-native-svg-transformer/issues/267
Currently, when I upgraded to version 0.72.0. The metro.config.js file looks like that
And I don't know how to put the metro setup into the config. I tried to put the async() function into config, but it couldn't finds the assetExts.filter.