forked from facebook/react-native
-
Notifications
You must be signed in to change notification settings - Fork 146
/
Copy pathmetro.config.js
45 lines (41 loc) · 1.44 KB
/
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
*/
'use strict';
const {getDefaultConfig} = require('@react-native/metro-config');
const {mergeConfig} = require('metro-config');
const path = require('path');
/**
* This cli config is needed for development purposes, e.g. for running
* integration tests during local development or on CI services.
*
* @type {import('metro-config').MetroConfig}
*/
const config = {
// Make Metro able to resolve required external dependencies
watchFolders: [
path.resolve(__dirname, '../../node_modules'),
path.resolve(__dirname, '../assets'),
path.resolve(__dirname, '../community-cli-plugin'),
path.resolve(__dirname, '../dev-middleware'),
path.resolve(__dirname, '../normalize-color'),
path.resolve(__dirname, '../polyfills'),
path.resolve(__dirname, '../react-native'),
path.resolve(__dirname, '../react-native-test-library'),
path.resolve(__dirname, '../virtualized-lists'),
path.resolve(__dirname, '../react-native-popup-menu-android'),
],
resolver: {
blockList: [/..\/react-native\/sdks\/hermes/],
extraNodeModules: {
'react-native': path.resolve(__dirname, '../react-native'),
},
platforms: ['ios', 'macos', 'android'], // [macOS]
},
};
module.exports = mergeConfig(getDefaultConfig(__dirname), config);