forked from Minds/mobile-native
-
Notifications
You must be signed in to change notification settings - Fork 0
/
metro.config.js
30 lines (24 loc) · 879 Bytes
/
metro.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
const { getDefaultConfig } = require('@expo/metro-config');
const { getSentryExpoConfig } = require('@sentry/react-native/metro');
const path = require('path');
const workspaceRoot = __dirname;
const projectRoot = __dirname;
const config = getSentryExpoConfig(projectRoot);
// 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'),
];
// Override getTransformOptions so we can turn inlineRequires on
config.transformer.getTransformOptions = async () => ({
transform: {
experimentalImportSupport: false,
inlineRequires: true,
unstable_disableES6Transforms: false,
},
preloadedModules: false,
ramGroups: [],
});
module.exports = config;