mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-24 02:02:36 -04:00
23 lines
814 B
JavaScript
23 lines
814 B
JavaScript
// Learn more https://docs.expo.dev/guides/monorepos
|
|
const { getDefaultConfig } = require("expo/metro-config");
|
|
const path = require("path");
|
|
|
|
// Find the project and workspace directories
|
|
const projectRoot = __dirname;
|
|
// This can be replaced with `find-yarn-workspace-root`
|
|
const workspaceRoot = path.resolve(projectRoot, "../..");
|
|
|
|
const config = getDefaultConfig(projectRoot);
|
|
|
|
// 1. Watch all files within the monorepo
|
|
config.watchFolders = [workspaceRoot];
|
|
// 2. Let Metro know where to resolve packages and in what order
|
|
config.resolver.nodeModulesPaths = [
|
|
path.resolve(projectRoot, "node_modules"),
|
|
path.resolve(workspaceRoot, "node_modules"),
|
|
];
|
|
// 3. Force Metro to resolve (sub)dependencies only from the `nodeModulesPaths`
|
|
config.resolver.disableHierarchicalLookup = true;
|
|
|
|
module.exports = config;
|