-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmetro.config.js
More file actions
29 lines (27 loc) · 825 Bytes
/
metro.config.js
File metadata and controls
29 lines (27 loc) · 825 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
const { getDefaultConfig } = require("expo/metro-config");
module.exports = (async () => {
const config = await getDefaultConfig(__dirname); // Ensure `__dirname` is passed
config.resolver.unstable_conditionNames = [
"browser",
"require",
"react-native",
];
return {
...config, // Keep default configurations
transformer: {
...config.transformer,
babelTransformerPath: require.resolve("react-native-svg-transformer/expo"),
getTransformOptions: async () => ({
transform: {
experimentalImportSupport: false,
inlineRequires: true,
},
}),
},
resolver: {
...config.resolver,
assetExts: config.resolver.assetExts.filter((ext) => ext !== "svg"),
sourceExts: [...config.resolver.sourceExts, "svg"],
},
};
})();