-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmetro.config.js
More file actions
29 lines (25 loc) · 858 Bytes
/
metro.config.js
File metadata and controls
29 lines (25 loc) · 858 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
// Learn more https://docs.expo.io/guides/customizing-metro
const { getDefaultConfig } = require('expo/metro-config');
/** @type {import('expo/metro-config').MetroConfig} */
let config = getDefaultConfig(__dirname, {
// [Web-only]: Enables CSS support in Metro.
isCSSEnabled: true
});
const { transformer, resolver } = config;
config.transformer = {
...transformer,
babelTransformerPath: require.resolve('react-native-svg-transformer')
};
config.resolver = {
...resolver,
assetExts: resolver.assetExts.filter((ext) => ext !== 'svg'),
sourceExts: [...resolver.sourceExts, 'svg']
};
// 2. Enable Tamagui
const { withTamagui } = require('@tamagui/metro-plugin');
config.resolver.sourceExts.push('mjs');
module.exports = withTamagui(config, {
components: ['tamagui'],
config: './lib/tamagui/config.ts',
outputCSS: './tamagui-web.css'
});