react-native-firebase/bridge/rn-cli.config.js

29 lines
721 B
JavaScript
Raw Normal View History

const { resolve } = require('path');
2018-03-23 13:40:07 +00:00
let metroBundler;
try {
metroBundler = require('metro');
} catch (ex) {
metroBundler = require('metro-bundler');
}
const blacklist = metroBundler.createBlacklist;
2018-03-23 13:40:07 +00:00
module.exports = {
getProjectRoots() {
return [__dirname, resolve(__dirname, '..')];
},
getProvidesModuleNodeModules() {
return ['react-native', 'react', 'prop-types', 'fbjs'];
},
getBlacklistRE() {
return blacklist([
new RegExp(`^${escape(resolve(__dirname, '..', 'node_modules'))}\\/.*$`),
new RegExp(`^${escape(resolve(__dirname, '..', 'tests'))}\\/.*$`),
new RegExp(
`^${escape(resolve(__dirname, '..', 'tests', 'node_modules'))}\\/.*$`
),
]);
},
};