-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmetro.config.js
More file actions
21 lines (18 loc) · 790 Bytes
/
metro.config.js
File metadata and controls
21 lines (18 loc) · 790 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
const path = require('node:path');
const { getDefaultConfig } = require('expo/metro-config');
const { withTransformersReactNativeMetro } = require('@automatalabs/react-native-transformers/metro');
const projectRoot = __dirname;
const workspaceRoot = path.resolve(projectRoot, '..');
const appNodeModulesPath = path.resolve(projectRoot, 'node_modules');
const config = getDefaultConfig(projectRoot);
config.resolver.nodeModulesPaths = [
appNodeModulesPath,
path.resolve(workspaceRoot, 'node_modules'),
];
module.exports = withTransformersReactNativeMetro(config, {
watchFolders: [workspaceRoot],
aliases: {
'onnxruntime-react-native': path.resolve(appNodeModulesPath, 'onnxruntime-react-native'),
'react-native': path.resolve(appNodeModulesPath, 'react-native'),
},
});