forked from microsoft/react-native-macos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
metro.config.js
42 lines (37 loc) · 1.13 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
/**
* 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.
*
* @flow
* @format
*/
'use strict';
const getPolyfills = require('./rn-get-polyfills');
/**
* This cli config is needed for development purposes, e.g. for running
* integration tests during local development or on CI services.
*/
const config = {
serializer: {
getPolyfills,
},
resolver: {
platforms: ['ios', 'macos', 'android'],
extraNodeModules: {
'react-native': __dirname,
},
blockList: [/android-patches\/.*/],
},
transformer: {},
};
// In scripts/run-ci-e2e-tests.js this file gets copied to a new app, in which
// case these settings do not apply.
if (!process.env.REACT_NATIVE_RUNNING_E2E_TESTS) {
const InitializeCore = require.resolve('./Libraries/Core/InitializeCore');
const AssetRegistry = require.resolve('./Libraries/Image/AssetRegistry');
config.serializer.getModulesRunBeforeMainModule = () => [InitializeCore];
config.transformer.assetRegistryPath = AssetRegistry;
}
module.exports = config;