-
-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathmetro.config.js
More file actions
32 lines (26 loc) · 850 Bytes
/
metro.config.js
File metadata and controls
32 lines (26 loc) · 850 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
30
31
32
/* eslint-env node */
const { getDefaultConfig } = require('expo/metro-config');
const { FileStore } = require('metro-cache');
const os = require('os');
const path = require('path');
/** @type {import('expo/metro-config').MetroConfig} */
const config = getDefaultConfig(__dirname);
// SVG transformer configuration
config.transformer = {
...config.transformer,
babelTransformerPath: require.resolve('react-native-svg-transformer'),
};
// Module resolution
config.resolver = {
...config.resolver,
assetExts: config.resolver.assetExts.filter((ext) => ext !== 'svg'),
sourceExts: [...config.resolver.sourceExts, 'svg'],
unstable_conditionNames: ['require', 'react-native', 'default'],
};
// Cache configuration
config.cacheStores = [
new FileStore({
root: path.join(os.tmpdir(), 'metro-cache'),
}),
];
module.exports = config;