mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
06763852de
Stacked on #30401. Previously we were transferring the original V8 stack trace string to the client and then parsing it there. However, really the server is the one that knows what format it is and it should be able to vary by server environment. We also don't use the raw string anymore (at least not in enableOwnerStacks). We always create the native Error stacks. The string also made it unclear which environment it is and it was tempting to just use it as is. Instead I parse it on the server and make it a structured stack in the transfer format. It also makes it clear that it needs to be formatted in the current environment before presented.
34 lines
940 B
JavaScript
34 lines
940 B
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
|
|
*/
|
|
|
|
import type {Request} from 'react-server/src/ReactFlightServer';
|
|
import type {ReactComponentInfo} from 'shared/ReactTypes';
|
|
|
|
export * from '../ReactFlightServerConfigBundlerCustom';
|
|
|
|
export * from '../ReactFlightServerConfigDebugNoop';
|
|
|
|
export * from '../ReactFlightStackConfigV8';
|
|
|
|
export type Hints = any;
|
|
export type HintCode = any;
|
|
// eslint-disable-next-line no-unused-vars
|
|
export type HintModel<T: any> = any;
|
|
|
|
export const supportsRequestStorage = false;
|
|
export const requestStorage: AsyncLocalStorage<Request | void> = (null: any);
|
|
|
|
export const supportsComponentStorage = false;
|
|
export const componentStorage: AsyncLocalStorage<ReactComponentInfo | void> =
|
|
(null: any);
|
|
|
|
export function createHints(): any {
|
|
return null;
|
|
}
|