Files
react-native/packages/react-native/metro.config.js
Tim Yung d77057741d RN: Flowify Non-Library Files (#51790)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51790

Adds `flow` or `noflow` to the remaining files that are outside of `packages/react-native/{Library,src}`.

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D75904614

fbshipit-source-id: cb2c0969065cf443c3a6e74da0fa3708fda67d18
2025-06-04 12:03:52 -07:00

46 lines
1.2 KiB
JavaScript

/**
* 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 strict-local
* @format
*/
'use strict';
/*::
import type {ConfigT} from 'metro-config';
*/
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.
*/
const config = {
// Make Metro able to resolve required packages that might be imported from /packages/react-native
watchFolders: [
path.resolve(__dirname, '../../node_modules'),
path.resolve(__dirname, '../assets'),
path.resolve(__dirname, '../normalize-color'),
path.resolve(__dirname, '../polyfills'),
path.resolve(__dirname, '../virtualized-lists'),
],
resolver: {
blockList: [/buck-out/, /sdks\/hermes/],
extraNodeModules: {
'react-native': __dirname,
},
},
};
module.exports = mergeConfig(
getDefaultConfig(__dirname),
config,
) /*:: as ConfigT */;