mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-01-15 23:59:08 +00:00
fix: deps linking
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user