Unverified Commit 9c626ac9 authored by Niklas Mischkulnig's avatar Niklas Mischkulnig Committed by GitHub

Remove Edge runtime handling in use-cache-wrapper (#98139)

Cache components are only compatible with Node.js runtime anyway. So
this was basically dead code. Removing it doesn't break any existing
functionality.
parent 52cd5b96
......@@ -348,8 +348,6 @@ const crossRequestPendingCacheInvocations = new Map<
Promise<SharedCacheResult>
>()
const isEdgeRuntime = process.env.NEXT_RUNTIME === 'edge'
// The first argument at each call site is the full directive that produced
// the invocation, e.g. "'use cache'" or "'use cache: remote'".
const debug = process.env.NEXT_PRIVATE_DEBUG_CACHE
......@@ -3576,9 +3574,7 @@ export async function cache(
// to be added to the consumer. Instead, we'll wait for any ClientReference to be emitted
// which themselves will handle the preloading.
moduleLoading: null,
moduleMap: isEdgeRuntime
? clientReferenceManifest.edgeRscModuleMapping
: clientReferenceManifest.rscModuleMapping,
moduleMap: clientReferenceManifest.rscModuleMapping,
serverModuleMap: getServerModuleMap(),
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment