mirror of
https://github.com/formbricks/formbricks.git
synced 2025-12-29 09:50:10 -06:00
Co-authored-by: tykerr <tykerr@gmail.com> Co-authored-by: Dhruwang <dhruwangjariwala18@gmail.com> Co-authored-by: Dhruwang Jariwala <67850763+Dhruwang@users.noreply.github.com> Co-authored-by: pandeymangg <anshuman.pandey9999@gmail.com> Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
22 lines
806 B
JavaScript
22 lines
806 B
JavaScript
// Learn more https://docs.expo.io/guides/customizing-metro
|
|
const path = require("node:path");
|
|
const { getDefaultConfig } = require("expo/metro-config");
|
|
|
|
// 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"),
|
|
];
|
|
// 3. Force Metro to resolve (sub)dependencies only from the `nodeModulesPaths`
|
|
config.resolver.disableHierarchicalLookup = true;
|
|
|
|
module.exports = config;
|