mirror of
https://github.com/HKUDS/DeepTutor.git
synced 2026-12-02 05:59:36 +08:00
Keep the checked-in React Native projects and shared turn transport. Add Expo SDK 57 and Dev Client, mobile tests and native build jobs, and instructions for self-hosted development.
20 lines
724 B
JavaScript
20 lines
724 B
JavaScript
const { getDefaultConfig } = require('expo/metro-config');
|
|
const path = require('node:path');
|
|
|
|
const webRoot = path.resolve(__dirname, '../../web');
|
|
const config = getDefaultConfig(__dirname);
|
|
config.watchFolders = [...new Set([...config.watchFolders, webRoot])];
|
|
config.resolver.nodeModulesPaths = [
|
|
path.join(__dirname, 'node_modules'),
|
|
...(config.resolver.nodeModulesPaths ?? []),
|
|
];
|
|
const expoResolve = config.resolver.resolveRequest;
|
|
config.resolver.resolveRequest = (context, moduleName, platform) => {
|
|
const name = moduleName.startsWith('@/')
|
|
? path.join(webRoot, moduleName.slice(2))
|
|
: moduleName;
|
|
return (expoResolve ?? context.resolveRequest)(context, name, platform);
|
|
};
|
|
|
|
module.exports = config;
|