mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
64d4b84204
* Rename Flight to Transport Flight is still the codename for the implementation details (like Fiber). However, now the public package is react-transport-... which is only intended to be used directly by integrators. * Rename names
31 lines
632 B
JavaScript
31 lines
632 B
JavaScript
/**
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*
|
|
* @flow
|
|
*/
|
|
|
|
type WebpackMap = {
|
|
[filename: string]: ModuleMetaData,
|
|
};
|
|
|
|
export type BundlerConfig = WebpackMap;
|
|
|
|
// eslint-disable-next-line no-unused-vars
|
|
export type ModuleReference<T> = string;
|
|
|
|
export type ModuleMetaData = {
|
|
id: string,
|
|
chunks: Array<string>,
|
|
name: string,
|
|
};
|
|
|
|
export function resolveModuleMetaData<T>(
|
|
config: BundlerConfig,
|
|
modulePath: ModuleReference<T>,
|
|
): ModuleMetaData {
|
|
return config[modulePath];
|
|
}
|