From a5ffbd6a4c73684b909f378bc082daa79f9476a2 Mon Sep 17 00:00:00 2001 From: Fredrik Burmester Date: Wed, 1 Oct 2025 20:59:17 +0200 Subject: [PATCH] fix: deps linking --- metro.config.js | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/metro.config.js b/metro.config.js index adc6dd18..2e9a0e06 100644 --- a/metro.config.js +++ b/metro.config.js @@ -1,7 +1,5 @@ // Learn more https://docs.expo.io/guides/customizing-metro const { getDefaultConfig } = require("expo/metro-config"); -const path = require("node:path"); -const fs = require("node:fs"); /** @type {import('expo/metro-config').MetroConfig} */ const config = getDefaultConfig(__dirname); // eslint-disable-line no-undef @@ -25,27 +23,6 @@ if (process.env?.EXPO_TV === "1") { config.resolver.sourceExts = tvSourceExts; } -// Support for symlinked packages (yarn link) - only if the directory exists -const linkedPackagePath = path.resolve( - __dirname, - "../react-native-background-downloader", -); - -if (fs.existsSync(linkedPackagePath)) { - console.log("Detected symlinked package, configuring Metro to support it"); - - // Watch the linked package directory - config.watchFolders = [linkedPackagePath]; - - // Add the parent directory to node module paths - config.resolver.nodeModulesPaths = [path.resolve(__dirname, "node_modules")]; - - // Map the package to the local directory - config.resolver.extraNodeModules = { - "@kesha-antonov/react-native-background-downloader": linkedPackagePath, - }; -} - // config.resolver.unstable_enablePackageExports = false; module.exports = config;