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