I am trying to run react native app on Andriod but I am getting this error presets: ['module:metro-react-native-babel-preset'],
, Could someone please help me to how to resolve this issue.
const {getDefaultConfig} = require('metro-config');
module.exports = {
transformer: {
getTransformOptions: async () => ({
transform: {
experimentalImportSupport: false,
inlineRequires: true,
},
}),
},
};
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'],
},
};
})();
Via Active questions tagged javascript - Stack Overflow https://ift.tt/9yCVw1N
Comments
Post a Comment