Packages

nuxt

4.6.4 · 2 Nov 2026MIT3.6M / weekRepositoryHomepagenpmAtom feed

The latest release, 4.6.4, is affected by 4 advisories with no fixed version yet.See advisories
Your version

3.15.0

24 Dec 2024Where it was published

3.21.11 is the newest release of 3.x.

In short

11 new5 faster33 fixed56 internal

Security

19 advisories affect 3.15.0; 4.6.2 fixes the others

14 more

Release note

Highlights

Snowfall!

Happy holidays! You'll notice when you start Nuxt that (if you're in the Northern Hemisphere) there's some snow on the loading screen (#29871).

Vite 6 included

Nuxt v3.15 includes Vite 6 for the first time. Although this is a major version, we expect that this won't be a breaking change for Nuxt users (see full migration guide). However, please take care if you have dependencies that rely on a particular Vite version.

One of the most significant changes with Vite 6 is the new Environment API, which we hope to use in conjunction with Nitro to improve the server dev environment. Watch this space!

You can read the full list of changes in the Vite 6 changelog.

Chromium devtools improvements

We talk a lot about the Nuxt DevTools, but v3.15 ships with better integration in dev mode for Chromium-based browser devtools.

We now use the Chrome DevTools extensibility API to add support for printing nuxt hook timings in the browser devtools performance panel.

CleanShot 2024-11-14 at 15 05 22@2x

Navigation mode for callOnce

callOnce is a built-in Nuxt composable for running code only once. For example, if the code runs on the server it won't run again on the client. But sometimes you do want code to run on every navigation - just avoid the initial server/client double load. For this, there's a new mode: 'navigation' option that will run the code only once per navigation. (See #30260 for more info.)

await callOnce(() => counter.value++, { mode: 'navigation' })

HMR for templates, pages + page metadata

We now implement hot module reloading for Nuxt's virtual files (like routes, plugins, generated files) as well as for the content of page metadata (within a definePageMeta macro) (#30113).

This should mean you have a faster experience in development, as well as not needing to reload the page when making changes to your routes.

Page meta enhancements

We now support extracting extra page meta keys (likely used by module authors) via experimental.extraPageMetaExtractionKeys (#30015). This enables module authors to use this information at build time, in the pages:resolved hook.

We also now support local functions in definePageMeta (#30241). This means you can do something like this:

function validateIdParam(route) {
  return !!(route.params.id && !isNaN(Number(route.params.id)))
}

definePageMeta({
  validate: validateIdParam,
})

Performance improvements

We now preload the app manifest in the browser if it will be used when hydrating the app (#30017).

We'll also tree shake vue-router's hash mode history out of your bundle if we can - specifically, if you haven't customised your app/router.options.ts (#30297).

v4 updates

A few more changes shipped for the new defaults for v4, including only inlining styles by default for Vue components (#30305).

Upgrading

As usual, our recommendation for upgrading is to run:

npx nuxi@latest upgrade --force

This will refresh your lockfile as well, and ensures that you pull in updates from other dependencies that Nuxt relies on, particularly in the unjs ecosystem.

Changelog

compare changes

Enhancements

  • kit: Allow module default options to be async

  • nuxt: Add new types to vue preset

  • nuxt: Experimental extraPageMetaExtractionKeys

  • nuxt,schema: Allow setting serialisable vue app config

  • nuxt: Print nuxt hook timings in browser devtools

  • nuxt: Support vue directive auto-imports within unimport

  • schema: Add snow effect on loading screen in winter

  • nuxt: Support local functions in definePageMeta

  • nuxt: Add mode: 'navigation' to callOnce

Performance

  • nuxt: Preload app manifest

  • nuxt: Use static hashMode option

  • vite: Use vite to clear screen

  • schema: Only inline styles for vue components

  • nuxt: Remove useId from composable key plugin

Fixes

  • nuxt: Check if nuxt link observer is null

  • nuxt: Unref the default value of asyncData when clearing

  • kit: Re-export addServerTemplate

  • Remove unused dependencies and tidy project

  • vite: Add back some dev-bundler dependencies

  • nuxt: Do not persist extraExtractionKeys on runtime route.meta

  • nuxt: Allow array/object style value for head components

  • nuxt: Tidy up remnants of previous useId implementation

  • kit,nuxt: Provide buildDir to normalizeTemplate

  • kit: Add better logging for non-resolved modules

  • nuxt: Correct return type of useRequestFetch

  • nuxt,vite: Hmr for templates, pages + page metadata

  • nuxt: Use nitropack rather than nitro import

  • kit: Use resolved module paths for transpile + modulesDir

  • Update engines.node to match dependencies

  • schema: Allow routerOptions.history to return null

  • nuxt: Render client page directly when not hydrating

  • nuxt: Use useId for island client component teleport id

  • nuxt: De-default async layout components

  • nuxt: Correct types for nuxt and nuxt/app

  • nuxt,schema: Allow showing spa loader til after hydration

  • nuxt: Remove whitespace around spa loading template

  • nuxt: Hoist environment types

  • schema: Hoist nitro runtime types

  • nuxt: Ensure getRouteRules works with nitro signature

  • nuxt: Respect replace in middleware with navigateTo

  • nuxt: Update import paths for nitropack

  • nuxt: Don't use <RouterLink> for links starting with #

  • vite: Ignore optimising #app-manifest

  • nuxt: Use useId for client-fallback component uid

  • schema: Gate inline style change behind v4 check

  • nuxt: Do not resolve deep imports for @vitest/

  • kit: Initialize tsconfig paths in addTemplate if undefined

  • nuxt: Treat client useAsyncData calls as async boundaries

  • nuxt: Initialise import.meta.hot.data

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.