Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
*/
const defaultSourceExts = require('metro-config/src/defaults/defaults').sourceExts;
module.exports = {
transformer: {
getTransformOptions: async () => ({
transform: {
experimentalImportSupport: false,
inlineRequires: false,
},
}),
},
resolver: {
sourceExts: process.env.RN_SRC_EXT
? process.env.RN_SRC_EXT.split(',').concat(defaultSourceExts)
: defaultSourceExts
}
};
resolver: {
blacklistRE: blacklist(
isE2E ? blist : blist.concat([RegExp(`${escapedRoot}\/packages\/mobile\/e2e\/mocks/.*`)])
),
extraNodeModules: {
...nodeLibs,
'crypto-js': path.resolve(cwd, 'node_modules/crypto-js'),
'isomorphic-fetch': require.resolve('cross-fetch'),
net: require.resolve('react-native-tcp'),
'react-native': path.resolve(cwd, 'node_modules/react-native'),
'react-native-fs': path.resolve(cwd, 'node_modules/react-native-fs'),
'react-native-screens': path.resolve(cwd, 'node_modules/react-native-screens'),
'react-native-svg': path.resolve(cwd, 'node_modules/react-native-svg'),
vm: require.resolve('vm-browserify'),
},
sourceExts: isE2E ? ['e2e.ts', 'e2e.js'].concat(defaultSourceExts) : defaultSourceExts,
},
watchFolders: [root],
}