Browse Source

correcting error in metro.config.js when generating the build

master
Joselito Lima 1 year ago
parent
commit
d0192b5be9
  1. 5
      src/app.json
  2. 5
      src/metro.config.js

5
src/app.json

@ -50,6 +50,11 @@
"wasm", "wasm",
"svg" "svg"
] ]
},
"extra": {
"eas": {
"projectId": "5402ab13-6a3c-4cd0-89bd-770e3a6c25c3"
}
} }
} }
} }

5
src/metro.config.js

@ -1,12 +1,13 @@
const { getDefaultConfig } = require("metro-config");
const { getDefaultConfig } = require('expo/metro-config');
module.exports = (async () => { module.exports = (async () => {
const { const {
resolver: { sourceExts, assetExts }, resolver: { sourceExts, assetExts },
} = await getDefaultConfig();
} = getDefaultConfig(__dirname);
return { return {
transformer: { transformer: {
babelTransformerPath: require.resolve("react-native-svg-transformer"), babelTransformerPath: require.resolve("react-native-svg-transformer"),
assetPlugins: ['expo-asset/tools/hashAssetFiles'],
}, },
resolver: { resolver: {
assetExts: [...assetExts.filter((ext) => ext !== "svg"), "db"], assetExts: [...assetExts.filter((ext) => ext !== "svg"), "db"],

Loading…
Cancel
Save