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.12.0

11 Jun 2024Where it was published

3.21.11 is the newest release of 3.x.

In short

2 removed2 deprecated45 new11 faster66 fixed103 internal

  • Removed

    schema: Remove some experimental options for v4

  • Removed

    kit,nuxt: Remove handling for node 14 perf api

  • Deprecated

    nuxt: Deprecate process.* flags

  • Deprecated

    Deprecate pending value in data fetching composables

Security

20 advisories affect 3.12.0; 4.6.0 fixes the others

15 more

Release note

Highlights

We're on the road to the release of Nuxt 4, but we've not held back in Nuxt v3.12. A huge thank you to the 75+ Nuxt contributors and community members who have been part of this release. ❤️

Testing Nuxt 4 changes

Nuxt 4 is on the horizon, and it's now possible to test out the behaviour changes that will be coming in the next major release (#26925) by setting an option in your nuxt.config file:

export default defineNuxtConfig({
  future: {
    compatibilityVersion: 4,
  },
})

As we've been merging PRs for Nuxt 4, we've been enabling them behind this flag. As much as possible we're aiming for backwards compatibility - our test matrix is running the same fixtures in both v3 and v4 compatibility mode.

There is a lot to say here, with 10+ different PRs and behaviour changes documented and testable, but for full details, including migration steps, see the v4 upgrade documentation.

We'd be very grateful for early testing of what's coming in Nuxt 4! 🙏

Nuxt Scripts auto-install

We've been gradually working to release Nuxt Scripts. It's currently in public preview, but we're near a public release, so we've added some stubs for composables that (when used) will prompt installing the @nuxt/scripts module.

👉 Watch out for the launch - and an article explaining more!

Layer auto-registration and bugfixes

Just like ~/modules, any layers within your project in the ~/layers directory will now be automatically registered as layers in your project (#27221).

We also now correctly load layer dependencies, which should resolve a range of issues with monorepos and git installations (#27338).

Built-in accessibility improvements

We now have a built-in <NuxtRouteAnnouncer> component and corresponding useRouteAnnouncer composable, which will be added by default to new Nuxt templates going forward.

For full details, see the original PR (#25741) and documentation.

We're continuing to work on nuxt/a11y - expect to hear more on that in future!

Performance improvements

We've landed some performance improvements as well, many of which are behind the compatibilityVersion: 4 flag, such as a move away from deeply reactive asyncData payloads.

Significant improvements include deduplicating modules (#27475) - which will apply mostly to layer users who specify modules in their layers. In one project, we saw 30s+ improvement in starting Nuxt.

We've also improved Vite dev server start up time by excluding common ESM dependencies from pre-bundling, and would suggest module authors consider doing the same (#27372).

We improved chunk determinism, so sequential builds should be less likely to have completely different chunk hashes (#27258).

And we tree shake more client-only composables from your server builds (#27044), and have reduced the size of server component payloads (#26863).

Multi-app support

We've landed a couple of changes that take us toward a place of supporting multi-app natively in Nuxt, including a multiApp experimental flag (#27291) and the ability to have multiple Nuxt app instances running in parallel at runtime (#27068).

While it's not yet ready, please do follow along on the tracker issue, and feel free to pitch in if this is interesting to you.

DX wins

We now serialise more things in your dev server logs, including VNodes (#27309) and URLs. We also addressed a bug that could lead to a frozen dev server.

When accessing private runtime config in the browser, we now let you know with a more informative error message (#26441).

Stabilising features

We've removed some experimental options that have been stabilised and which we feel no longer need to be configurable:

  • experimental.treeshakeClientOnly (enabled by default since v3.0.0)

  • experimental.configSchema (enabled by default since v3.3.0)

  • experimental.polyfillVueUseHead (disabled since v3.4.0) - implementable in user-land with plugin

  • experimental.respectNoSSRHeader (disabled since v3.4.0) - implementable in user-land with server middleware

We've also enabled scanPageMeta by default (#27134). This pulls out any page metadata in your definePageMeta macro, and makes it available to modules (like @nuxtjs/i18n) so they can augment it.

This unlocks much better module/typed routing integration, but has a potential performance cost - so please file an issue if you experience any problems.

Type improvements

We now have support for typed #fallback slots in server components (#27097).

We've also improved some defaults in your generated tsconfig.json, including setting module: 'preserve' if you have a locally installed TypeScript v5.4 version (see docs) - see #26667, #27485.

Module author/power user improvements

We have shipped a range of type improvements for module authors, including:

  • Support for typed module options in installModule

  • The option to specify compatibility with certain builders (vite/webpack) in module options

  • A new onPrehydrate hook for hooking into the browser hydration cycle

  • The ability to access and update resolved runtime configuration within modules, with new build-time useRuntimeConfig and updateRuntimeConfig utils

Inlined UI templates

If you previously used @nuxt/ui-templates then it may be worth knowing that we have moved them from a separate repository into the nuxt/nuxt monorepo. (This is purely a refactor rather than a change, although you can expect some new designs for Nuxt v4.)

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

  • nuxt: Support passing options to useRequestURL

  • nuxt: Introduce imports.scan option

  • nuxt: Add <NuxtRouteAnnouncer> and useRouteAnnouncer

  • kit: Handle virtual files in resolvePath and findPath

  • nuxt: Expose useLink from NuxtLink

  • schema: V4 opt-in with future.compatibilityVersion

  • nuxt,schema: Inline error, welcome, spa-loading templates

  • nuxt: Configurable app.rootAttrs and teleportAttrs

  • schema: Enable cookieStore by default

  • nuxt,schema: Support new Nuxt folder structure

  • nuxt: Treeshake onUpdated and onUnmounted on server

  • nuxt: Prompt to install nuxt/scripts on usage

  • nuxt: Expose default slot from <NuxtPage>

  • nuxt: Custom renderSSRHeadOptions config for unhead

  • nuxt: Add onPrehydrate lifecycle hook

  • nuxt: Support multiple nuxtApps at runtime

  • nuxt: Add #fallback slot to server components types

  • nuxt: Allow specifying builder compatibility in modules

  • kit: Add useRuntimeConfig and updateRuntimeConfig utils

  • Removed

    schema: Remove some experimental options for v4

  • nuxt: Auto-register layers in layers/ directory

  • nuxt: Allow displaying error state in loading indicator

  • nuxt,schema: Add appId and improve chunk determinism

  • nuxt: Check schema/kit versions when loading nuxt

  • schema: Add experimental multiApp flag

  • nuxt: Respect defaults when clearing asyncData

  • nuxt: Display banner when run with compatibilityVersion

  • nuxt: Add URL serialiser for dev server logs

  • nuxt: Handle nuxt route injection for this.$route

  • nuxt: Allow configuring interval for checking app update

  • nuxt: Warn when accessing private runtimeConfig on client

  • kit: Support typed module options in installModule

  • kit,schema: Add .with for better module options types

  • nuxt: Register plugin hooks before executing plugins

  • nuxt,schema: Add compatibilityDate flag for future

Performance

  • nuxt: Don't add client fallback plugin if not enabled

  • nuxt: Unsubscribe from asyncData watch when unmounted

  • nuxt: Remove state from nuxt island response

  • nuxt: Emit simpler functional ui templates (w/o lodash)

  • ui-templates: Don't emit message data for pure strings

  • nuxt: Remove ssrContext.styles reference (from unused vue-style-loader)

  • nuxt: Mark payload as shallowReactive

  • nuxt: Abort vue render when plugins throw error

  • vite: Exclude common ESM deps from pre-bundling

  • Removed

    kit,nuxt: Remove handling for node 14 perf api

  • nuxt: Deduplicate modules to install

  • webpack: Decrease iteration count and improve type safety

Fixes

  • nuxt: Prevent getCachedData from shaping type of useAsyncData

  • nuxt: Encode location header in navigateTo

  • nuxt: Correctly remove extension from path in hasSuffix

  • nuxt: Hint prerenderer to crawl routes at runtime

  • kit: Ignore negation when resolving ignore patterns

  • nuxt: Avoid double-slash in ignore pattern

  • kit: Set typescript moduleDetection to 'force'

  • nuxt: Re-initialise nuxt._ignore after all modules run

  • nuxt: Assign v-for to slot in islands

  • nuxt: Don't encode location header

  • nuxt: Check if _scope is active before calling run function (#26756, #26904)

  • nuxt: Don't scan component dirs when enabled is false

  • vite: Inline styles for vue components with lang="ts"

  • nuxt: Handle arrays correctly in updateAppConfig

  • nuxt: useState in NuxtClientFallback setup function

  • nuxt: Compile plugin templates last

  • nuxt: Register redirect middleware before pushing route

  • nuxt,schema: Remove .js extension from template imports

  • nuxt: Don't overwrite existing scope in runWithContext

  • schema: Use v3 folder structure if app.vue exists in rootDir

  • nuxt: Use resolved path for test component import

  • nuxt: Use URL constructor to resolve external protocols

  • nuxt: Use URL for parsing URLs rather than parseURL

  • Deprecated

    nuxt: Deprecate process.* flags

  • nuxt: Provide default url for URL constructor

  • nuxt: Preload links with same hostname

  • nuxt: Remove unused prop in NuxtTeleportIslandComponent

  • nuxt: Don't pass options to spaLoadingTemplate function

  • nuxt: Scan folder indices for middleware

  • nuxt: Pass path to jiti and not file URL

  • schema: Hoist `@nuxt/devtools types for config auto-completion

  • nuxt: Correct components dir regexp

  • schema: Handle dev/test buildId in schema

  • nuxt: Encode location header in navigateTo

  • nuxt: Invert version check

  • nuxt: Exempt equality check for kit/schema version

  • nuxt: Use undefined rather than null for data fetching defaults

  • vite: Ignore query/hash when resolving public assets

  • nuxt: Clear timeout when asyncData request finishes/aborts

  • nuxt: Provide default data type values in nuxt/app dir

  • nuxt: Add module declarations for virtual files

  • nuxt: Respect app.cdnURL for extracted payloads

  • vite: Handle runtime paths in inlined styles

  • nuxt: Add VNode reviver & don't deduplicate dev logs

  • vite: Suppress warning about unresolved public assets

  • nuxt: Defer shared asyncData promises to next tick

  • nuxt: Resolve modules from layers directories

  • schema: Pass correct jsx config for esbuild-loader

  • nuxt: Transpile app.config files in nitro build

  • nuxt: Use relative paths in app.config.d.ts

  • vite: Disable optimizeDeps in ssr

  • vite: Don't get available port when hmr.server is set

  • nuxt: Mark nuxt/scripts stubs as lower priority

  • nuxt: Handle errors loading app manifest

  • schema: Exclude non-serialisable types from app options

  • nuxt: Deduplicate app.head arrays

  • kit: Improve defaults in generated tsconfig.json

  • nuxt: Use buildAssetsDir in island teleport dev chunk

  • kit: Do not use module: preserve unelss ts v5.4 is installed

  • nuxt: Ensure payload script executes before entry

  • kit: Avoid fallback to normalized path in module loading

  • nuxt: Also augment page metadata after pages:extend hook

  • nuxt: Resolve full path to app manifest stub page

  • nuxt: Resolve paths without file extensions

  • kit: Revert back to esnext target

  • kit,schema: Revert changes to module options types

  • nuxt: Remove boolean value for dedupe in v4 compat

  • nuxt: Add parent scopeId to server components

  • nuxt: Handle symbol keys in wrapped runtime config

  • nuxt: Register augmented pages to avoid re-augmenting

  • nuxt: Use file path as key for re-augmenting

Documentation

  • Deprecated

    Deprecate pending value in data fetching composables

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.