/* eslint-disable */

const {
    getDefaultConfig,
    mergeConfig
} = require("@react-native/metro-config");
const path = require("path");

const root = path.resolve(__dirname, "../..");
const source = path.resolve(__dirname, "../src");

const nodeModulesPaths = [
    path.resolve(root, "node_modules")
];

/**
 * Metro configuration
 * https://reactnative.dev/docs/metro
 *
 * @type {import('@react-native/metro-config').MetroConfig}
 */
const config = {
};

config.watchFolders = [
    root,
    source
];

config.resolver.extraNodeModules = {
    "ncore-ui-kit": path.resolve(root, "src"),
    "react": path.resolve(root, "node_modules/react"),
    "react-native": path.resolve(root, "node_modules/react-native")
};

config.resolver.nodeModulesPaths = nodeModulesPaths;

config.resolver.disableHierarchicalLookup = true;

module.exports = mergeConfig(getDefaultConfig(__dirname), config);
