/
githubmirror
/
react-native
Обзор
Документация
Войти
/
githubmirror
/
react-native
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
packages/rn-tester/metro.config.js
47 строк
2 KB
Alex Hunt
Migrate Node.js builtin imports to node: scheme (#57611)
21 июл 2026, 19:01
21 июл 2026, 19:01
89300ac
Код
Авторство
О чём код?
/** * 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 * @noflow */ 'use strict'; const {getDefaultConfig} = require('@react-native/metro-config'); const {mergeConfig} = require('metro-config'); const path = require('node: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, '../asset-utils'), path.resolve(__dirname, '../community-cli-plugin'), path.resolve(__dirname, '../dev-middleware'), path.resolve(__dirname, '../new-app-screen'), path.resolve(__dirname, '../normalize-color'), path.resolve(__dirname, '../polyfills'), path.resolve(__dirname, '../react-native'), path.resolve(__dirname, '../virtualized-lists'), path.resolve(__dirname, '../react-native-popup-menu-android'), path.resolve(__dirname, '../react-native-test-library/apple'), path.resolve(__dirname, '../react-native-test-library/common'), ], resolver: { blockList: [/..\/react-native\/sdks\/hermes/], extraNodeModules: { 'react-native': path.resolve(__dirname, '../react-native'), }, }, }; module.exports = mergeConfig(getDefaultConfig(__dirname), config);