Files
self/app/metro.config.js
Nicolas Brugneaux 90b0e4a270 Navigation Refactor (#6)
Co-authored-by: Leszek Stachowski <leszek.stachowski@clabs.co>
Co-authored-by: Justin Hernandez <transphorm@gmail.com>
2025-01-29 17:16:12 +01:00

33 lines
876 B
JavaScript

const { getDefaultConfig, mergeConfig } = require('@react-native/metro-config');
const path = require('path');
const defaultConfig = getDefaultConfig(__dirname);
const { assetExts, sourceExts } = defaultConfig.resolver;
const commonPath = path.join(__dirname, '/../common');
const extraNodeModules = {
common: path.resolve(commonPath),
};
const watchFolders = [path.resolve(commonPath)];
/**
* Metro configuration
* https://facebook.github.io/metro/docs/configuration
*
* @type {import('metro-config').MetroConfig}
*/
const config = {
transformer: {
babelTransformerPath: require.resolve(
'react-native-svg-transformer/react-native',
),
},
resolver: {
extraNodeModules,
assetExts: assetExts.filter(ext => ext !== 'svg'),
sourceExts: [...sourceExts, 'svg'],
},
watchFolders,
};
module.exports = mergeConfig(defaultConfig, config);