2023-12-11 21:22:23 +05:30
|
|
|
const { getDefaultConfig, mergeConfig } = require('@react-native/metro-config');
|
2019-09-09 19:25:02 +02:00
|
|
|
/**
|
2023-12-11 21:22:23 +05:30
|
|
|
* Metro configuration
|
|
|
|
* https://facebook.github.io/metro/docs/configuration
|
2019-09-09 19:25:02 +02:00
|
|
|
*
|
2023-12-11 21:22:23 +05:30
|
|
|
* @type {import('metro-config').MetroConfig}
|
2019-09-09 19:25:02 +02:00
|
|
|
*/
|
2023-12-11 21:22:23 +05:30
|
|
|
const config = {
|
2023-06-19 19:09:12 +05:30
|
|
|
transformer: {
|
|
|
|
getTransformOptions: async () => ({
|
|
|
|
transform: {
|
|
|
|
experimentalImportSupport: false,
|
|
|
|
inlineRequires: true,
|
|
|
|
},
|
|
|
|
}),
|
|
|
|
},
|
|
|
|
resolver: {
|
2023-12-11 21:22:23 +05:30
|
|
|
resolverMainFields: ['react-native', 'browser', 'main'],
|
|
|
|
nodeModulesPaths: ['./node_modules'],
|
2023-06-19 19:09:12 +05:30
|
|
|
extraNodeModules: require('node-libs-react-native'),
|
2023-12-11 21:22:23 +05:30
|
|
|
unstable_enableSymlinks: true,
|
2023-06-19 19:09:12 +05:30
|
|
|
},
|
2019-09-09 19:25:02 +02:00
|
|
|
};
|
2023-12-11 21:22:23 +05:30
|
|
|
module.exports = mergeConfig(getDefaultConfig(__dirname), config);
|