Skip to content

Commit e3d1ffb

Browse files
committed
Name "cache" streams for React DevTools
1 parent daf8b06 commit e3d1ffb

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/next/src/server/use-cache/use-cache-wrapper.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -734,6 +734,11 @@ async function generateCacheEntryImpl(
734734
errors
735735
)
736736

737+
if (process.env.NODE_ENV === 'development') {
738+
// Name the stream for React DevTools.
739+
returnStream.name = 'use cache';
740+
}
741+
737742
return {
738743
type: 'cached',
739744
// Return the stream as we're creating it. This means that if it ends up

0 commit comments

Comments
 (0)