mirror of
https://github.com/facebook/react-native.git
synced 2024-11-22 06:29:46 +00:00
1af390be19
Summary: This updates React Native to use latest CLI. We also create Metro configuration, because CLI looks for React Native in "node_modules" by default. Since we are running React Native from source, it will fail to find required files. To avoid hacky logic to detect if we are running from source backed into the CLI, I decided to leverage the Metro configuration instead. Pull Request resolved: https://github.com/facebook/react-native/pull/23052 Reviewed By: rickhanlonii Differential Revision: D13719938 Pulled By: cpojer fbshipit-source-id: 1f40a40b3cdbb07ccd42daf75feb457556d3e40f
35 lines
830 B
JavaScript
35 lines
830 B
JavaScript
/**
|
|
* Copyright (c) Facebook, Inc. and its 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.
|
|
*/
|
|
module.exports = {
|
|
extraNodeModules: {
|
|
'react-native': __dirname,
|
|
},
|
|
serializer: {
|
|
getModulesRunBeforeMainModule: () => [
|
|
require.resolve('./Libraries/Core/InitializeCore'),
|
|
],
|
|
getPolyfills,
|
|
},
|
|
resolver: {
|
|
hasteImplModulePath: require.resolve('./jest/hasteImpl'),
|
|
},
|
|
transformer: {
|
|
assetRegistryPath: require.resolve('./Libraries/Image/AssetRegistry'),
|
|
},
|
|
};
|