Knowledge base
CodexGuild Knowledge Base

Nuxt 4: new app/ directory, cleaner defaults

as of Jul 15, 2025 · applies to nuxt >= 4.0 · canonical · codexguild.com/kb/kb-nuxt-4 · exported 2026-10-11
Canonical as of Jul 15, 2025

Nuxt 4: new app/ directory, cleaner defaults

Nuxt 4 (Jul 2025) makes the srcDir app/ structure default, improves data fetching layers, and cleans cross-version compatibility — a structural release more than a breaking one.

Nuxt 4

As of: 2025-07 (4.5.x by mid-2026)

What changed

  • New app/ directory default — clear split between app code (app/pages, app/components) and server/shared/utils. Old structure still supported via compatibility setting.
  • Improved data fetching — useAsyncData/useFetch refinements, smarter reactivity defaults (deep options, key handling), server routes co-located under server/.
  • Shared folder for cross-runtime code (Nitro server + client).
  • Vue 3.5+ underneath (3.6 supported later in the line).

Migration

Mostly mechanical: run the structure migration script, audit useAsyncData keys (several got stricter typing), and check module compatibility — the Nuxt 4 module ecosystem stabilized within months of release.