react-native-get-pixel_edit/node_modules/@react-native/community-cli-plugin/dist/utils/metroPlatformResolver.js.flow
2025-07-09 11:41:52 +09:00

31 lines
913 B
Plaintext

/**
* 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
* @oncall react_native
*/
import type { CustomResolver } from "metro-resolver";
/**
* This is an implementation of a metro resolveRequest option which will remap react-native imports
* to different npm packages based on the platform requested. This allows a single metro instance/config
* to produce bundles for multiple out of tree platforms at a time.
*
* @param platformImplementations
* A map of platform to npm package that implements that platform
*
* Ex:
* {
* windows: 'react-native-windows'
* macos: 'react-native-macos'
* }
*/
declare export function reactNativePlatformResolver(platformImplementations: {
[platform: string]: string,
}): CustomResolver;