Nuxt 4.0 is out: what changes and how to upgrade from Nuxt 3

On 15 July 2025 the Nuxt team released Nuxt 4.0. Unlike the jump from Nuxt 2 to Nuxt 3, this is not a rebuild but a stability-focused major release with a few deliberate breaking changes. If you run a Nuxt 3 project today, you do not have to act right away: according to the announcement, Nuxt 3 will receive maintenance updates until the end of January 2026. I still recommend reading the upgrade guide now and testing the upgrade in a separate branch. In this article I summarise what changes according to the announcement and the upgrade guide, and in which order I approach it.

Why is Nuxt 4 not a second Nuxt 3?

I moved a web application from Nuxt 2 to Nuxt 3 with my team, including a new component library and new state management. Nuxt 4 is set up differently. The team describes it as a stability-focused release that arrives after a year of real-world testing. According to the announcement, most of the breaking changes have been testable with a compatibility flag for over a year. In Nuxt 3 that flag was compatibilityVersion: 4 under future in nuxt.config. For most breaking changes there are also configuration options that bring back the old behaviour while you adjust.

The announcement names four focus areas: a cleaner project structure with the new app/ directory, reworked data fetching, better TypeScript support with separate projects per context, and a faster CLI.

What changes in the project structure?

The most visible change: application code lives in an app/ directory by default. The new default srcDir is app/, containing assets/, components/, composables/, layouts/, middleware/, pages/, plugins/ and utils/ as well as app.vue, app.config.ts and error.vue. The project root keeps nuxt.config.ts, content/, layers/, modules/, public/ and server/. The ~ alias now points to app/.

The guide gives two reasons. File watchers no longer have to scan node_modules/ and .git/, which could significantly delay startup on non-Mac operating systems. And because server/ no longer sits in the same folder as the rest of the app, the IDE can tell client and server code apart more reliably.

Moving is not required. If Nuxt detects the old structure, for example a top-level pages/ directory, everything keeps working as before. To pin the old structure explicitly, the guide suggests:

export default defineNuxtConfig({
  srcDir: '.',
  dir: {
    app: 'app'
  }
})

What changes in data fetching?

In my view this is the part that needs the most attention. useAsyncData and useFetch have been reorganised:

  • All calls with the same key share the same data, error and status refs. Calls with the same explicit key must therefore not have conflicting options such as deep, transform, pick, getCachedData or default.
  • Keys can be reactive: a computed, a ref or a getter function. When the key changes, Nuxt fetches the data again.
  • When the last component using a piece of data is unmounted, Nuxt removes that data.
  • data is now a shallowRef. If your code changes a property inside the data, that no longer triggers reactivity. If you need it, set deep: true per call.
  • data and error now default to undefined instead of null. Checks for null need updating.
  • pending is only true while status is also pending. With immediate: false, pending stays false until the first request.

The guide suggests extracting calls that share a key and have custom options into their own composable. That matches what I already did during the Nuxt 3 migration: bundling data fetching in reusable composables instead of rewriting it in every component.

What changes for TypeScript?

Nuxt now generates separate TypeScript configurations for the app, the server, the shared/ folder and build-time code: .nuxt/tsconfig.app.json, .nuxt/tsconfig.server.json, .nuxt/tsconfig.shared.json and .nuxt/tsconfig.node.json. According to the guide, existing projects that extend .nuxt/tsconfig.json keep working as before. To get the improved type checking, you switch the root tsconfig.json to project references and run vue-tsc with -b. The announcement explicitly calls this the change most likely to cause surprises when upgrading, because the new setup may surface type issues that were hidden before.

There is also a stricter default: noUncheckedIndexedAccess is now true. The guide recommends fixing the new errors rather than reverting the option.

What else is gone?

  • Nuxt 2 compatibility has been removed from @nuxt/kit. According to the announcement, this mainly affects module authors.
  • The top-level generate configuration no longer exists. generate.routes and generate.exclude become nitro.prerender.routes and nitro.prerender.ignore.
  • The global window.__NUXT__ object is removed after hydration. The data is available through useNuxtApp().payload.
  • Unhead, which generates the <head> tags, has moved to version 2. The props vmid, hid, children and body are gone.

How do I approach the upgrade?

The announcement describes three steps, and that is how I would approach it:

  1. Update Nuxt. The recommended command is npx nuxt upgrade --dedupe. It also deduplicates the lockfile and helps pull in updates to dependencies Nuxt relies on.
  2. Optionally use the codemods. Together with Codemod, the Nuxt team built a recipe that automates many, though not all, migration steps: npx codemod@latest nuxt/4/migration-recipe. You can deselect individual codemods during the run.
  3. Test and adjust. Run your tests, check the build and read the upgrade guide for the cases that occur in your project.

Before step 1 it is worth checking the modules you use. The announcement points out that a few modules might need further updates for full Nuxt 4 compatibility. Whatever is missing there sets the schedule.

How long will Nuxt 3 be maintained?

According to the announcement, Nuxt 3 will receive maintenance updates, meaning bug fixes and backports of features from Nuxt 4, until the end of January 2026. Looking ahead, the team plans to release Nuxt 5 on the sooner side, with Nitro v3 and h3 v2. According to the roadmap, Nuxt 4 bundles the features that were previously behind compatibilityVersion: 4, and Nuxt 5 is meant to follow shortly after. As a general rule, the Nuxt team commits to supporting each major version for at least six months after the release of the next one.

What I take away

  • Nuxt 4 is a manageable upgrade. For most changes there is a way back while you adjust.
  • Data fetching deserves the most attention: shared keys, shallowRef, undefined instead of null and the new pending.
  • The new TypeScript setup may surface errors that were hidden before. That is work, but useful work.
  • Check modules first, then upgrade, then codemods and tests.
  • There is time until the end of January 2026. It is best spent on a clean upgrade, not on postponing it.

All articles

Legal Notice

DIGITALPASSION Ltd.

Tassou Papadopoulou 16
House 2
8270 Tremithousa, Cyprus
Email:
info@kevin-damiani.de
Register Number:
HE 454538
Represented by:
Kevin Damiani
VAT ID:
CY60039739L

IT Liability Insurance

exali AG
Franz-Kobinger-Str. 9, 86157 Augsburg

Dispute Resolution

We are not willing or obliged to participate in dispute resolution proceedings before a consumer arbitration board.

Liability for Content

As a service provider, we are responsible for our own content on these pages in accordance with general laws. However, liability is only possible from the time of knowledge of a specific infringement.

Copyright

The content and works created by the site operators on these pages are subject to German copyright law. Downloads and copies of this site are only permitted for private, non-commercial use.

Privacy Policy

The protection of your personal data is important to us. This privacy policy informs you about the processing of personal data on this website and in the iPad app DrawBook (see DrawBook).

Data Controller

Responsible for data processing on this website and in the DrawBook app is:

DIGITALPASSION Ltd.
Tassou Papadopoulou 16, House 2, 8270 Tremithousa, Cyprus
Email: info@kevin-damiani.de

Hosting

This website runs on our own server at Hostinger International Limited, 61 Lordou Vironos Street, 6023 Larnaca, Cyprus, in the data center in Frankfurt am Main; Hostinger processes the data on our behalf (Art. 28 GDPR). To deliver the page, our web server processes your IP address, the time, the page viewed and the referring page, and your browser identifier. It keeps no access log; it passes page views on only in shortened form for web analytics (see Web Analytics). If it cannot deliver the page, it writes an error line with the time, the page viewed and the referring page (both without parameters after the "?"), your browser identifier and your IP address shortened to the first 24 bits (IPv4) or 48 bits (IPv6). These lines are overwritten continuously: we keep at most 30 MB of them, and older ones are dropped as new ones arrive, so there is no period in days. In addition, Hostinger backs up the whole server once a week in a data center in Lithuania and keeps the two most recent backups. The legal basis is our legitimate interest in providing the website securely and reliably (Art. 6(1)(f) GDPR). You are not obliged to provide this data; without the transmission of your IP address, however, the website cannot be delivered.

Cookies and local storage

This website does not set any cookies and stores nothing in your browser's storage (neither localStorage nor sessionStorage). No identifiers for recognizing you are stored on your device, and there are no entries from third parties; how we count visits is described under Web Analytics.

Web Analytics

So that we know how often this website is visited, where visitors come from and which language version they read, our web server (see Hosting) evaluates each successfully loaded page view. No script runs in your browser for this, no cookies are set and nothing is read from or stored on your device. If your browser sends the Global Privacy Control or Do Not Track signal, the page view is not counted. It shortens the IP address (for IPv4 without the last byte, for IPv6 only the first 48 bits) and passes it on, together with the time, the page viewed, the referring page (both without parameters after the "?"), the browser identifier and the name of this website, to our own analytics software Umami, which runs on the same server (see Hosting). It does not pass on other details of the request, such as the language setting, and it writes no log in doing so. Umami stores neither the IP address nor the browser identifier, but derives browser, operating system and device type as well as country, region and city from them, plus page, referrer and time. It groups page views into visits using an identifier calculated from the shortened address, the browser identifier and a secret key that changes every day; page views from different days therefore cannot be linked. Umami does not count page views from recognizable bots. Umami deletes the data after 363 days. Backups are stored encrypted on a server we run ourselves in Cyprus and mirrored from there to storage in Germany that we also run ourselves; no copy is older than 400 days. We do not pass the data on to third parties. The legal basis is our legitimate interest in knowing the reach of the website and improving it (Art. 6(1)(f) GDPR); you can object under Art. 21 GDPR (see Your Rights), most easily by turning on Global Privacy Control or Do Not Track in your browser.

Fonts

This website uses locally hosted fonts (self-hosting). No connections are made to external servers such as Google Fonts.

Contact

If you contact us by email, your information will be stored for processing the request and for possible follow-up questions. We receive and store emails with our processor Fastmail Pty Ltd, Australia; there is no adequacy decision of the European Commission for Australia, so the transfer is based on the EU Standard Contractual Clauses in Fastmail's data processing agreement (available at fastmail.com/policies/dpa). Beyond that, we will not share this data without your consent. The legal basis is Art. 6(1)(b) GDPR if your request aims at concluding or performing a contract, otherwise our legitimate interest in answering it (Art. 6(1)(f) GDPR). We delete the data once the request has been dealt with, unless statutory retention obligations apply. Providing your information is voluntary; without an email address we cannot reply to you.

DrawBook

DrawBook is a free note-taking and drawing app for iPad that DIGITALPASSION Ltd. offers on the App Store. We run no server for DrawBook: we receive neither your notebooks nor your AI requests or API keys. The app needs no DrawBook account, and it contains no analytics, no advertising and no tracking.

Notebooks, drawings, typed text and imported PDF pages stay on your device, in the app's protected storage, and are excluded from automatic device backups. If you export or share something, you decide where the copy goes. Deleting the app also deletes its notebooks.

You can also use the AI chat "Drawing AI". It only works with your own API key for OpenRouter, Ollama Cloud, Anthropic (Claude) or OpenAI; the app stores the key in your device's Keychain. Nothing is sent until you tap "Activate" under "AI configuration" and confirm the dialog that follows. This consent applies to the selected provider, model and image setting, and the app checks it before and after every request. "Deactivate" withdraws it, and "Remove Saved API Key" deletes the key.

Requests go over HTTPS directly from your device to the selected provider (openrouter.ai, ollama.com, api.anthropic.com or api.openai.com). They contain your prompt, the recent conversation and a summary of the page. When the AI reads the page, editable objects such as typed text and shapes are added, along with handwriting recognized on your device and the coordinates of your strokes. If "Send Page as Image to AI" is on (off by default), the AI can also request an image of the page, including an imported PDF background. OpenRouter may forward a request to the actual model provider.

DIGITALPASSION does not receive this data. The app transfers it only with your consent (Art. 6(1)(a) GDPR) to the provider, which processes it under its own terms as an independent controller. How long the provider keeps it is set by its terms; you exercise your rights regarding data it has already received with the provider. DrawBook keeps the chat history only in memory, and "New thread" clears it. We answer privacy questions about DrawBook at info@kevin-damiani.de.

Your Rights

You have the right to:

  • Information about your stored data (Art. 15 GDPR)
  • Correction of inaccurate data (Art. 16 GDPR)
  • Deletion of your data (Art. 17 GDPR)
  • Restriction of processing (Art. 18 GDPR)
  • Data portability, where processing is based on consent or a contract and carried out by automated means (Art. 20 GDPR)
  • Withdrawal of consent given, at any time and with effect for the future (Art. 7(3) GDPR)

In case of complaints, you can contact the responsible data protection supervisory authority (Art. 77 GDPR).

Right to object

Where we process data on the basis of legitimate interests (Art. 6(1)(f) GDPR), you can object at any time on grounds relating to your particular situation (Art. 21 GDPR). An informal email is sufficient.

SSL Encryption

This website uses SSL encryption for security reasons. You can recognize an encrypted connection by the lock symbol in your browser's address bar.

Changes

We reserve the right to adapt this privacy policy to changes in the law or in the service.

Last updated: November 2026