-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmetro.config.js
24 lines (22 loc) · 888 Bytes
/
metro.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
const { getDefaultConfig, mergeConfig } = require('@react-native/metro-config')
const { withNativeWind } = require('nativewind/metro')
const { wrapWithReanimatedMetroConfig } = require('react-native-reanimated/metro-config')
// const path = require('path')
const defaultConfig = getDefaultConfig(__dirname)
const { assetExts, sourceExts } = defaultConfig.resolver
/**
* Metro configuration
* https://facebook.github.io/metro/docs/configuration
*
* @type {import('@react-native/metro-config').MetroConfig}
*/
const config = mergeConfig(defaultConfig, {
transformer: {
babelTransformerPath: require.resolve('react-native-svg-transformer'),
},
resolver: {
assetExts: [...assetExts.filter((ext) => ext !== 'svg'), 'lottie'],
sourceExts: [...sourceExts, 'svg'],
},
})
module.exports = wrapWithReanimatedMetroConfig(withNativeWind(config, { input: './global.css' }))