Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const { createBlacklist } = require('metro');
// const { mergeConfig } = require('metro-config');
const rootDir = resolve(__dirname, '..');
const packagesDir = resolve(rootDir, 'packages');
const isDirectory = source => statSync(source).isDirectory() && !source.includes('/template');
const firebaseModules = readdirSync(packagesDir)
.map(name => join(packagesDir, name))
.filter(isDirectory);
const config = {
projectRoot: __dirname,
resolver: {
useWatchman: !process.env.TEAMCITY_VERSION,
blackListRE: createBlacklist([
/.*\/__fixtures__\/.*/,
/.*\/template\/project\/node_modules\/react-native\/.*/,
new RegExp(`^${escape(resolve(rootDir, 'docs'))}\\/.*$`),
new RegExp(`^${escape(resolve(rootDir, 'tests/ios'))}\\/.*$`),
new RegExp(`^${escape(resolve(rootDir, 'packages/template/project'))}\\/.*$`),
new RegExp(`^${escape(resolve(rootDir, 'packages/template/project/node_modules'))}\\/.*$`),
new RegExp(
`^${escape(resolve(rootDir, 'packages/template/project/node_modules/react-native'))}\\/.*$`,
),
new RegExp(`^${escape(resolve(rootDir, 'tests/e2e'))}\\/.*$`),
new RegExp(`^${escape(resolve(rootDir, 'tests/android'))}\\/.*$`),
new RegExp(`^${escape(resolve(rootDir, 'tests/functions'))}\\/.*$`),
]),
extraNodeModules: new Proxy(
{},
{
const { resolve, join } = require("path");
const { createBlacklist } = require("metro");
const { mergeConfig } = require("metro-config");
const { DEFAULT } = require("react-native/local-cli/util/Config");
// https://github.com/facebook/react-native/blob/master/local-cli/core/Constants.js
// https://github.com/facebook/react-native/blob/master/local-cli/util/Config.js
const config = {
resolver: {
blackListRE: createBlacklist([
new RegExp(
`^${escape(resolve(__dirname, "..", "..", "node_modules"))}\\/.*$`
)
]),
extraNodeModules: new Proxy(
{},
{
get: (target, name) => {
if (name === "react-native-location") {
return join(__dirname, `../../src`);
}
return join(__dirname, `node_modules/${name}`);
}
}
),
platforms: ["android", "ios"]
const getBlacklistRE = () => {
return createBlacklist([/.*\/__fixtures__\/.*/]);
};
const getBlacklistRE = () => {
return createBlacklist([/.*\/__fixtures__\/.*/]);
};
const { createBlacklist } = require('metro');
const rootDir = resolve(__dirname, '../..');
const packagesDir = resolve(rootDir, 'packages');
const isDirectory = source => statSync(source).isDirectory();
const virgilModules = readdirSync(packagesDir)
.map(name => join(packagesDir, name))
.filter(isDirectory);
const virgilPackageNames = virgilModules.map(path => basename(dirname(path)));
const config = {
projectRoot: __dirname,
resolver: {
blackListRE: createBlacklist([
new RegExp(
`^${escape(
resolve(rootDir, 'examples/ReactNativeSample/android'),
)}\\/.*$`,
),
new RegExp(
`^${escape(
resolve(rootDir, 'examples/ReactNativeSample/ios'),
)}\\/.*$`,
),
new RegExp(
`^${escape(
resolve(rootDir, 'examples/ReactNativeSample/node_modules'),
)}\\/.*$`,
),
]),