-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmetro.config.js
More file actions
31 lines (27 loc) · 1.02 KB
/
metro.config.js
File metadata and controls
31 lines (27 loc) · 1.02 KB
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
// Learn more https://docs.expo.io/guides/customizing-metro
const { getDefaultConfig } = require('expo/metro-config');
const { withNativeWind } = require('nativewind/metro');
/** @type {import('expo/metro-config').MetroConfig} */
const config = getDefaultConfig(__dirname);
const { transformer, resolver } = config;
config.transformer = {
...transformer,
inlineRequires: true,
babelTransformerPath: require.resolve('react-native-svg-transformer')
};
config.resolver = {
...resolver,
assetExts: resolver.assetExts.filter(ext => ext !== 'svg'),
sourceExts: [...resolver.sourceExts, 'svg'],
extraNodeModules: {
net: require.resolve('react-native-tcp-socket'),
tls: require.resolve('react-native-tcp-socket')
}
};
module.exports = withNativeWind(config, {
input: './global.css',
inlineRem: 16
//https://www.nativewind.dev/v4/tailwind/typography/font-size#rem-scaling
//14 is actually the default value. We explicitelly set it. It only sets iOs and Android. For Web, we must use a css rule
//inlineRem: 14
});