Files
react-native/private/helloworld/metro.config.js
Tim Yung f0f71ea914 RN: Move {packages => private}/helloworld (#51934)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51934

Moves `packages/helloworld` to `private/helloworld`.

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D76356557

fbshipit-source-id: 92b20d75a8f2badb3c685d4918fe692623d9c04d
2025-06-11 17:39:26 -07:00

50 lines
1.3 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
*/
/*::
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> */;