/
githubmr
/
facebook-react-native
Обзор
Документация
Войти
/
githubmr
/
facebook-react-native
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
main
private/helloworld/metro.config.js
49 строк
1 KB
Tim Yung
RN: Move `{packages => private}/helloworld` (#51934)
12 июн 2025, 03:39
12 июн 2025, 03:39
f0f71ea
Код
Авторство
О чём код?
/** * 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 */ /*:: import type {InputConfigT} from 'metro-config'; */ const {getDefaultConfig, mergeConfig} = require('@react-native/metro-config'); const path = require('path'); function repositoryPath(relativePath /*: string */) { return path.join(__dirname, '..', '..', relativePath); } /** * Metro configuration * https://reactnative.dev/docs/metro * * @type {import('metro-config').MetroConfig} */ const config = { // Make Metro able to resolve required external dependencies watchFolders: [ repositoryPath('node_modules'), repositoryPath('packages/assets'), repositoryPath('packages/normalize-color'), repositoryPath('packages/polyfills'), repositoryPath('packages/react-native'), repositoryPath('packages/virtualized-lists'), ], resolver: { blockList: [/..\/..\/packages\/react-native\/sdks\/hermes/], extraNodeModules: { 'react-native': repositoryPath('packages/react-native'), }, }, }; module.exports = mergeConfig( getDefaultConfig(__dirname), config, ) /*:: as $ReadOnly<InputConfigT> */;