Keep static GET route handlers static
ProprietaryNext.js 15 no longer prerenders GET route handlers by default. Adds export const dynamic = 'force-static' to a GET handler that does not read the request and uses no next/headers or unstable_noStore and calls no imported code other than next/server, since a helper could read cookies or headers (such a handler gets a marker instead), so it keeps the Next.js 14 behavior. Files that export another HTTP method, a runtime other than 'nodejs' or a fetchCache segment config are left alone.
io. moderne. nextjs.15. route-handler-cache-defaultsmod run . --recipe= io. moderne. nextjs.15. route-handler-cache-defaultsInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.