Unverified Commit 3cd1a749 authored by JJ Kasper's avatar JJ Kasper Committed by GitHub

Ensure custom cache handlers are traced (#71521)

This ensures we properly include this in our traces for output
standalone.

x-ref:
https://github.com/vercel/next.js/actions/runs/11418733317/attempts/2
parent d4e390d0
...@@ -244,6 +244,7 @@ export async function collectBuildTraces({ ...@@ -244,6 +244,7 @@ export async function collectBuildTraces({
] ]
const { cacheHandler } = config const { cacheHandler } = config
const { cacheHandlers } = config.experimental
// ensure we trace any dependencies needed for custom // ensure we trace any dependencies needed for custom
// incremental cache handler // incremental cache handler
...@@ -257,6 +258,20 @@ export async function collectBuildTraces({ ...@@ -257,6 +258,20 @@ export async function collectBuildTraces({
) )
} }
if (cacheHandlers) {
for (const handlerPath of Object.values(cacheHandlers)) {
if (handlerPath) {
sharedEntriesSet.push(
require.resolve(
path.isAbsolute(handlerPath)
? handlerPath
: path.join(dir, handlerPath)
)
)
}
}
}
const serverEntries = [ const serverEntries = [
...sharedEntriesSet, ...sharedEntriesSet,
...(isStandalone ...(isStandalone
......
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