Files
next.js/test/e2e/app-dir/next-after-app-deploy/app/path-prefix.js
Janka UrygaandGitHub 45150fc75b [after] fix: execute revalidates added within unstable_after() (#70458)
### What?

Execute revalidations (written into
`staticGenerationStore.{revalidatedTags,pendingRevalidates,pendingRevalidateWrites}`) that were
added during `unstable_after` callbacks.

### Why?

Previously, if `revalidatePath`/`revalidateTag` were called in an
`unstable_after` callback, nothing would happen.

I missed the fact that other codepaths (app-render, action-handler,
app-route) all [manually call
`staticGenerationStore.incrementalCache.revalidateTag`](https://github.com/vercel/next.js/blob/79f4490b0abda3fa7129c49b402dbadf6eadd79e/packages/next/src/server/app-render/app-render.tsx#L1072-L1080)
to actually perform revalidations scheduled via
`revalidatePath`/`revalidateTag`, and `after-context` wasn't doing that,
so nothing was happening.
2024-09-27 13:47:02 +02:00

2 lines
57 B
JavaScript

export const pathPrefix = '/' + process.env.NEXT_RUNTIME