mirror of
https://github.com/zoriya/legend-list.git
synced 2026-08-15 18:44:30 +00:00
16 lines
611 B
JavaScript
16 lines
611 B
JavaScript
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 listRoot = path.resolve(projectRoot, '../src');
|
|
|
|
const config = getDefaultConfig(projectRoot);
|
|
|
|
// 1. Watch all files within the monorepo
|
|
config.watchFolders = [listRoot];
|
|
// 2. Let Metro know where to resolve packages and in what order
|
|
config.resolver.nodeModulesPaths = [path.resolve(projectRoot, 'node_modules'), path.resolve(listRoot, 'node_modules')];
|
|
|
|
module.exports = config; |