mirror of
https://github.com/zhigang1992/nativewind.git
synced 2026-06-15 18:27:52 +08:00
20 lines
668 B
JavaScript
20 lines
668 B
JavaScript
const { getDefaultConfig } = require("expo/metro-config");
|
|
// eslint-disable-next-line unicorn/prefer-node-protocol
|
|
const path = require("path");
|
|
|
|
// Find the workspace root, this can be replaced with `find-yarn-workspace-root`
|
|
const workspaceRoot = path.resolve(__dirname, "../..");
|
|
const projectRoot = __dirname;
|
|
|
|
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"),
|
|
];
|
|
|
|
module.exports = config;
|