Cache directive doesn't work with incremental PPR
focux opened this issue · 0 comments
focux commented
Link to the code that reproduces this issue
https://github.com/focux/dynamicio-with-inc-ppr-repro
To Reproduce
- Start the app
- Run
npm run build
Current vs. Expected behavior
When you try to build the app, it throws this error:
Error: x Only async functions are allowed to be exported in a "use cache" file.
| export const experimental_ppr = true;
I would expect the use cache
directive to work with incremental PPR. It currently work when ppr: true
and not incremental.
Provide environment information
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 24.1.0: Thu Oct 10 21:03:15 PDT 2024; root:xnu-11215.41.3~2/RELEASE_ARM64_T6000
Available memory (MB): 32768
Available CPU cores: 10
Binaries:
Node: 20.11.1
npm: 10.2.4
Yarn: 1.22.22
pnpm: 9.15.0
Relevant Packages:
next: 15.1.1-canary.2 // Latest available version is detected (15.1.1-canary.2).
eslint-config-next: N/A
react: 19.0.0
react-dom: 19.0.0
typescript: 5.3.3
Next.js Config:
output: N/A
Which area(s) are affected? (Select all that apply)
dynamicIO, Partial Prerendering (PPR)
Which stage(s) are affected? (Select all that apply)
next build (local)
Additional context
No response