Use a noStore for env access opts App Router out from the full request cache. This is problematic for static pages that can benefit from edge caching and is a blocker to adopting this library.
There is an experimental next build feature that allows splitting the build step from the generation step:
Where the compile step can execute in CI and the generate step can execute in the runtime.
Support for this build approach would allow for this library to support static ahead of time generation with a runtime env and get closer to Vercel Nextjs.
Use a
noStore
for env access opts App Router out from the full request cache. This is problematic for static pages that can benefit from edge caching and is a blocker to adopting this library.There is an experimental
next build
feature that allows splitting the build step from the generation step:next build --experimental-build-mode compile/generate
. https://github.com/vercel/next.js/discussions/46544Where the compile step can execute in CI and the generate step can execute in the runtime.
Support for this build approach would allow for this library to support static ahead of time generation with a runtime env and get closer to Vercel Nextjs.