add expo app

This commit is contained in:
Jorrin
2024-01-14 14:56:39 +01:00
parent 833a1c8ecd
commit 326ff1fe92
33 changed files with 11940 additions and 1507 deletions

View File

@@ -0,0 +1,27 @@
// Learn more https://docs.expo.io/guides/customizing-metro
const { getDefaultConfig } = require('expo/metro-config');
const path = require('path');
const projectRoot = __dirname;
const workspaceRoot = path.resolve(projectRoot, '../..');
/** @type {import('expo/metro-config').MetroConfig} */
const config = getDefaultConfig(projectRoot, {
// [Web-only]: Enables CSS support in Metro.
isCSSEnabled: true,
});
if (config.resolver) {
// 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`
// TODO: This is supposed to be true, but I couldn't get it to work in the monorepo.
config.resolver.disableHierarchicalLookup = false;
}
module.exports = config;