Skip to content

Commit bda4f0c

Browse files
committed
chore: add react native svg and your configuration on app
1 parent b821e97 commit bda4f0c

File tree

3 files changed

+1174
-8
lines changed

3 files changed

+1174
-8
lines changed

metro.config.js

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
const { getDefaultConfig } = require('expo/metro-config');
2+
3+
module.exports = (() => {
4+
const config = getDefaultConfig(__dirname);
5+
6+
const { transformer, resolver } = config;
7+
8+
config.transformer = {
9+
...transformer,
10+
babelTransformerPath: require.resolve('react-native-svg-transformer'),
11+
};
12+
config.resolver = {
13+
...resolver,
14+
assetExts: resolver.assetExts.filter(ext => ext !== 'svg'),
15+
sourceExts: [...resolver.sourceExts, 'svg'],
16+
};
17+
18+
return config;
19+
})();

0 commit comments

Comments
 (0)