From 19a5c6f2b7bbd2396ecb20d54c3471e7a52c1957 Mon Sep 17 00:00:00 2001 From: Sebastian Markbage Date: Thu, 12 Dec 2024 00:35:39 -0500 Subject: [PATCH] Inject Parcel Flight Client into DevTools This ensures that owner stacks can be printed for log replaying. --- .../src/client/ReactFlightDOMClientBrowser.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/react-server-dom-parcel/src/client/ReactFlightDOMClientBrowser.js b/packages/react-server-dom-parcel/src/client/ReactFlightDOMClientBrowser.js index 3c33d4f6157bc..a1da83b2d71ad 100644 --- a/packages/react-server-dom-parcel/src/client/ReactFlightDOMClientBrowser.js +++ b/packages/react-server-dom-parcel/src/client/ReactFlightDOMClientBrowser.js @@ -18,6 +18,7 @@ import { reportGlobalError, processBinaryChunk, close, + injectIntoDevTools, } from 'react-client/src/ReactFlightClient'; import { @@ -177,3 +178,7 @@ export function encodeReply( } }); } + +if (__DEV__) { + injectIntoDevTools(); +}