MigrationNew

    Next.js 16.4 Changed What create-next-app Gives You. Decide These Five Things Before You Scaffold.

    On 6 October Next.js started shipping Cache Components on by default in every new app, and confirmed it becomes the default in 17. If your migration scaffolds a fresh Next app this quarter, you are landing on the new model whether you chose it or not.

    New to this? Start with our guide: how to migrate a Lovable app to Next.js without breaking it.

    Nothing in your repo changed. The default did.

    Next.js 16.4 shipped on 6 October 2026. The release notes put it plainly: Cache Components is now recommended as the best choice for every Next.js app, every new app created with create-next-app has it enabled by default, and it becomes the default outright in Next.js 17.

    For an app you already run, that is an upgrade you schedule. For a migration, it is the floor you build on. A Lovable export is a Vite single-page app — Vite 8 landed in March 2026 and Vite 8.1 in June — and the usual path off it is to scaffold a fresh Next.js app and port your routes into it. Scaffold that app this week and you get the new caching model, whether or not it was on your list.

    That is not a warning. The model is better for most of what founders ship. But it is a different model, and porting a SPA into it while carrying the old model's assumptions produces one specific, expensive failure: pages that were supposed to be static quietly rendering at request time, and a server bill that grows with traffic instead of staying flat.

    What changed, in the terms a migration cares about

    Decision pointPrevious App Router modelCache Components (16.4 default for new apps)
    How caching is decidedImplicit, inferred from how you fetchExplicit, declared with use cache on the function or component
    Keeping a marketing page staticA convention, enforced in code reviewensureStatic fails the build if anything dynamic creeps in
    Personalised and static on one pageUsually splits the routeOne response streams prerendered content alongside request-time components
    Prefetch scopeThe whole routenavigation() and prefetch() defer parts until a real navigation
    Config to opt inNot applicablecacheComponents: true and partialPrefetching: true
    Upgrade pathManual, by handnext upgrade --agent, with codemods and verification steps

    Decision 1: Are you scaffolding fresh, or porting into an app that already exists?

    Run create-next-app today and you are on Cache Components with no further action. Port into a Next.js app that already exists and you are not — you opt in with two flags in next.config.ts: cacheComponents: true and partialPrefetching: true. Cache Components first shipped without Partial Prefetching; as of 16.4 the release notes treat both as part of the same model, so enabling one without the other leaves you in a half state. Settle which situation you are in before the first route lands, because the answer changes how every data-fetching function in the port gets written.

    Decision 2: Name the routes that must never render at request time

    This is the one that matters most if you are leaving a SPA for SEO reasons in the first place. Your landing page, your blog and your pricing page exist to be crawled and served from cache. Under the previous model, keeping them that way was a convention somebody had to enforce in review. 16.4 turns it into a build failure. Set ensureStatic to "navigation" on a route and Next.js refuses to build if dynamic content ever enters it. Put it on a layout and every page beneath it inherits the guarantee — the release notes suggest starting at the root layout and pushing it down to nested layouts as individual pages start needing dynamic content. Looser settings exist: "prefetch" covers links that explicitly prefetch, and "shell" covers what loads when a route is first discovered.

    Write that list of routes before the migration starts. It is a ten-minute conversation up front, or a billing investigation three months later.

    Decision 3: Set a prefetch budget before you switch prefetching on

    Prefetching removes loading states and is easy to turn on everywhere. The cost is that every visible link pulls down everything that route caches, including for the links nobody clicks. 16.4 gives you the scalpel. Awaiting navigation() inside a component excludes it from prefetches, deferring it until a real navigation happens. Awaiting prefetch() excludes content from a route's shell until an explicit prefetch takes place. Both come from next/cache. Decide which part of a heavy page is worth loading early — usually the first screen, not the entire thread or list sitting behind it.

    Decision 4: Decide who runs the upgrade, and how you hear about the next one

    16.4 added an agent-driven upgrade command, next upgrade --agent=latest, run through npx next@canary so you get current upgrade tooling even on an older Next.js. It checks your installed version, picks a target release, and hands your coding agent the migration guides, any needed codemods, and the verification steps.

    There is also experimental.agentUpgrade, which nudges you during next dev or next build when a relevant upgrade is available. Its default policy, "security", surfaces only upgrades that address known vulnerabilities affecting your installed version. "latest" surfaces newer majors and minors. false turns it off. Pick one deliberately. A migration that lands and then sits unpatched for a quarter has not actually finished.

    Decision 5: The new model brings its own advisory surface

    Moving to a newer model is not a free security win. Two of the September 2026 Next.js advisories apply specifically to apps running Cache Components, or the experimental.useCache flag. In GHSA-h694-7cp9-m8p3, a use cache function that calls another use cache function reading a root param can be keyed incorrectly, so content produced for one root param value can be served for a different one. In CVE-2026-94544, a pending use cache fill can leak Draft Mode content into regular responses, and that unpublished content can be persisted into a generated page and served to later visitors until the page is revalidated. Both were fixed in 16.3.8, the Active LTS, and 15.5.27, the Maintenance LTS.

    The point is not that the model is unsafe. It is that "we are on the new thing" is not a substitute for a patch cadence, and whoever owns your deploys should know which support lane they are on and who is watching it.

    What we would actually do

    Across 80 jobs on Upwork, the migrations that go badly are almost never the ones with hard technical problems. They are the ones where nobody wrote down which pages had to stay static, and found out from an invoice.

    If you are about to move a Lovable app to Next.js, our Strategy Audit is $499 — a one-hour scoping call, a written technical roadmap, a stack and architecture recommendation, and a timeline and cost estimate — and it is credited toward any build. The Publishable MVP is $4,999 and ships production-ready, with the SEO system, production deployment and monitoring included. The Founding Client tier is $2,999 and carries a 14-day build guarantee with a full refund if the deadline is missed. Every build carries our revenue guarantee: first paying customers within 90 days of launch, or a full refund.

    Book a free 20-min intro call

    Sources

    Related posts