npm nuxt 4.7.0
v4.7.0

one hour ago

v4.7.0 is the next minor release.

📣 Some news

🧪 Try Nitro v3 today

You can now build your Nuxt 4 app with Nitro v3 (#37101). Nitro v3 is what Nuxt 5 is built on, so this is a way to move your server code (and your modules) over before you upgrade Nuxt itself.

There's no config to change. Just add nitro to your dependencies:

npm install nitro

If nitro is in your package.json, Nuxt builds with Nitro v3. To go back, just remove it.

nitro-v3-build-dark

Caution

This is highly experimental. Nitro v3 is still a release candidate, and there are no guarantees. Please try it on a branch, not in production. 🙏

Do give Nitro v3 a try! On our benchmark app with about 170 pages, the same app on 4.7 served 33% more requests per second on its home page with Nitro v3 than with Nitro v2 (926 to 1,236), and 44% more on a page with 1,000 links (219 to 316), with identical HTML.

On Nuxt 4, Nitro v3 runs with a compatibility layer, nitroLegacy, which keeps imports from h3, nitropack and #imports resolving, keeps the Nitro v2 auto-imports, useRuntimeConfig(event), event.node and the Nitro v2 hooks working, and keeps a long list of h3 v1 behaviours. Once things work, set nitroLegacy: false to find the code that still depends on it.

A few things change with Nitro v3 regardless. The main one is route rules: /blog/* now also applies to /blog/2026/hello. Nuxt warns about each rule whose meaning changes (NUXT_B4029), and stops on a rule with more than one wildcard, like /api/*/items/**, which you can rewrite with a named parameter (/api/:id/items/**). Your app matches route rules the same way as the server, so Nuxt-only rules like appMiddleware and ssr apply to the same paths on both.

The other is imports. If your server code imported a package your app didn't depend on, Nitro v2 fell back to Nuxt's own dependencies. Nitro v3 doesn't, so nuxt dev fails with something like Cannot find package 'ufo'. Make sure every package your server code imports is in your package.json. The upgrade guide has the full list.

If something breaks for you (and it might), please open an issue and mention Nitro v3. ❤️

🖥️ Nuxt CLI 4.1

Nuxt 4.7 also comes with Nuxt CLI 4.1. The most visible change is that the CLI now renders the whole production build itself, from a set of new build hooks, with every builder and server builder (thanks to @atinux, nuxt/cli#1662, #37194):

build-after-dark

nuxt generate shows the prerendered routes in the same way, and ends by suggesting where to deploy. Logs from Nuxt and modules stay inside the build output rather than breaking out of it (nuxt/cli#1705), and with nitropack v2.14 a route that fails to prerender is listed with the pages that link to it (#37245).

There's more:

  • nuxt dev --https serves over HTTP/2 (thanks to @ProgramRipper, nuxt/cli#1694)
  • you can click and scroll inside the panes of the dev panel (thanks to @Flo0806, nuxt/cli#1665)
  • copying a URL or an error works without a system clipboard, for example over SSH or in a container (nuxt/cli#1693)
  • new nuxt module build and nuxt module prepare commands for module authors (nuxt/cli#1687), paving the way for @nuxt/module-builder v2, built on tsdown with support for TypeScript 7.1 (watch this space!)

👀 Highlights

🤖 WebMCP (experimental)

WebMCP is a proposed browser API that lets a page offer tools to AI agents running in the browser. With experimental.webmcp, tagging a function with @tool is enough (#37195):

<script setup lang="ts">
/**
 * Add one of a product to the cart. Use when the user wants to buy something.
 * @tool
 */
function addToCart (sku: string) {
  cart.value.push(sku)
}
</script>

<template>
  <button v-for="product in products" :key="product.sku" :disabled="!product.inStock" @click="addToCart(product.sku)">
    Add {{ product.name }}
  </button>
</template>

The arguments come from your template, so an agent can only do what a user could click. A @tool on a @submit handler fills in and submits the form for real, defineAgentTool() and useAgentTool() cover tools that don't map to one control, and useAgentActivity() shows the user what an agent is doing (with a way to stop it).

Nuxt also registers a navigate tool listing your pages, warns at build time about bindings that can't become tools (or descriptions that don't follow Chrome's tool design guidance), and in development writes each page's tools to .nuxt/webmcp/schema.json for webmcp-evals. In browsers without WebMCP, nothing registers and your app behaves exactly as before.

This started from @sdras's proposal for Vue and WebMCP, and much of its shape comes from her work and feedback. Thank you, Sarah! 💚

👉 Read the WebMCP guide.

🔎 All your problems in one place

With my-bad v1 and vite-plugin-checker v1, the dev error badge now collects problems too (#36918): type errors (with typescript.typeCheck), ESLint or any other Vite checker, Vue compiler warnings (#36967) and Nuxt's own scan warnings (#36969). Each opens in a drawer beside your page, or in the DevTools v4 dock.

problems-drawer-dark

And thanks to @sakaintp, typescript.typeCheck can now be 'dev' or 'build' (#36164).

🩺 Template diagnostics

Nuxt now checks your templates for mistakes the Vue compiler can't know about (#36754): a <NuxtLink> whose static to doesn't match any page (NUXT_B4025), and v-on, v-model, functions or class instances on a server component (NUXT_B3014, NUXT_B3015).

 WARN  [NUXT_B4025] <NuxtLink to="/abuot"> in app/pages/broken-link.vue does not match any page route.
├▶ fix: Check the path for typos or add a page for it. To link to a server route, a file in public/ or another site, set the external prop.
├▶ sources: app/pages/broken-link.vue:3:15
╰▶ see: https://nuxt.com/docs/4.x/errors/b4025

In development, these also show up on every open page until you fix them. Turn them off with experimental.templateDiagnostics: false.

🧯 Server-side error boundaries

With experimental.ssrErrorBoundary (on with compatibilityVersion: 5), <NuxtErrorBoundary> catches errors during server rendering too (#36990). One broken component no longer takes down the page: you get a 200, the #error slot in its place, and the client hydrates into the same state. A new retry-on-client prop replaces <NuxtClientFallback>, which is now deprecated. The slot also exposes clearBoundaryError, the same method as clearError under a name that can't be confused with the global clearError (#37079).

✅ Validated runtime config

Any value in runtimeConfig can now be a Standard Schema (Zod, ArkType, Valibot...) (#36905):

import { z } from 'zod'

export default defineNuxtConfig({
  runtimeConfig: {
    apiSecret: z.string(), // required at runtime
    public: {
      mode: z.enum(['preview', 'production']).default('production'),
    },
  },
})

Environment variables are converted to the schema's type at startup, and if anything is missing or invalid, the server doesn't start, and you get one error listing all of it. The schema itself never ends up in your server bundle.

runtime-config-error-dark

🚀 Performance

We spent a lot of this release profiling. On the starter app from e18e's framework benchmarks, and on our own benchmark apps:

v4.6.4 v4.7.0
installed packages, starter 523 473 -50
server output, starter 2.17 MB 1.23 MB -43%
initial page load, starter 80.4 kB, 14 requests 66.3 kB, 3 requests -18%
SSR throughput, starter 245 req/s 292 req/s +19%
SSR throughput, a page with 1,000 <NuxtLink>s 88 req/s 218 req/s 2.5x
SSR throughput, ~170 pages, with staticRoutes 890 req/s 1,976 req/s 2.2x
total blocking time, Nuxt UI landing page 276 ms 180 ms -35%

Some of the work behind that:

  • a new opt-in experimental.staticRoutes builds the server's route matcher once instead of per request, if you don't add routes at runtime (#36867) 🔥
  • V8 compile hints on the entry, layout and page chunks, and yielding between boot phases, for faster hydration (#36758, #36760)
  • static internal <NuxtLink>s render as plain anchors (#36904), and rendered HTML is encoded chunk by chunk (#36719)
  • ofetch is left out of the client when nothing uses $fetch (#35790), and so is unhead when nothing on the client touches the head, even without your own error.vue (#37035, #37243)
  • the browser loads fewer files before hydration (6 instead of 18 on our Nuxt UI benchmark page)
  • with experimental.viteEnvironmentApi (or compatibilityVersion: 5), the client and server build at the same time (#37047), and nuxt.schema files, decorators and JSX only cost build time when you use them (#37027, #37053, #37054)
  • in development, a request that's still rendering when the server rebuilds finishes on the old code instead of failing with a 503 (#37245)
  • nuxt no longer depends on @nuxt/devtools, and ships the tiny @nuxt/devtools-onboard instead, which loads DevTools v3 or v4 if you have it, or offers to install it (thanks to @antfu, #36581)

nuxt build is about 7% faster on the large app and about 6% slower on the starter, and nuxt dev starts as quickly as before.

A huge thank-you to @onmax, who sent over twenty performance PRs for this release. ❤️

🦀 Rsbuild builder

Thanks to @Nsttt, there's a new @nuxt/rsbuild-builder (builder: 'rsbuild') that hands your build to Rsbuild itself (#36499). It replaces @nuxt/rspack-builder, which is now deprecated.

🧰 For module authors

  • renderer plugins (addRendererPlugin()) add to the initial HTML with any server builder (#36601), plus a new render:document hook (#36989)
  • build:environment:* and build:prerender:* hooks report every bundle and prerendered route (#37194)
  • updateRuntimeConfig() accepts schemas, and there are extendRsbuildConfig() and addRsbuildPlugin()
  • defineHandler from nuxt/server, matching Nitro v3 (thanks to @atinux, #36929)
  • a nuxt.request tracing channel for APM tools (thanks to @logaretm, #36483)

🛠️ And more

  • addRouteMiddleware returns a function to remove the middleware again (#37080)
  • onNuxtReady accepts a timeout and a signal (#36743)
  • sourcemap: { client: 'nosource' } and a finish-color prop for <NuxtLoadingIndicator> (thanks to @0xgdr, #36534, #36533)
  • navigateTo(url, { open }) can pass noopener by default, with experimental.defaults.navigateTo.noopener (on with compatibilityVersion: 5) (#37075)
  • NuxtLinkSlotProps is exported from nuxt/app (thanks to @VividLemon, #37092)
  • serverFetch is typed against your server routes (#36543)
  • with Nitro v3, Nuxt warns in development when runtime config is mutated during server rendering (NUXT_E1014, #37076)
  • when Node.js has to reparse your nuxt.config as ESM, Nuxt suggests adding "type": "module" to your package.json (#37205)

🩹 Fixes

As always, lots of fixes. To name a few: @pawell67 made callOnce rerun after navigating away while it runs and stopped Nitro creating a request body stream until it's read (#37149, #37129), @astraldev made cookies set before a streamed response starts reach the browser and kept page loading going while a page is still pending (#37131, #37165), @waleedtariq109 made lazy hydration replay the interaction that triggered it (#36838), @lafllamme made a failed read of shared prerender data retry on later routes instead of prerendering them with null (#37244), and @posva kept the browser's restored scroll position on reload (#36957).

🔒 Security

This release fixes four security issues. We recommend upgrading. The advisories have the full details (and will be released later on 24 November).

  • Route rules on _payload.json (GHSA-jxc9-w3j6-pwp2, medium): affects a wildcard cache, swr or isr rule together with a more specific rule for a page. One user's page data could be cached and served to another.
  • Encoded slashes on catch-all routes (GHSA-vrh2-cfcx-c3fg, medium): an incomplete fix for GHSA-f3x9-2chm-73c8, affecting route rules (such as appMiddleware) on a catch-all page.
  • Dev server runtime config (GHSA-h5xj-x893-p5f7, low, development only): affects nuxt dev reachable from an untrusted network.

Thank you to @inanna-malick, @stilwel, @kanokwut, @onur-yuksekkaya, @DicksonWu654 and @rexpository for reporting these responsibly. 💚

Important

If you use cache, swr or isr route rules on pages with user-specific data, purge any CDN or edge cache that may already hold a _payload.json after you upgrade.

⚠️ Heads-up

  • Nuxt DevTools is no longer installed with Nuxt. If you use it, add @nuxt/devtools to your devDependencies (or click the button nuxt dev shows you).
  • Nuxt warns when your app's vue is older than the version it needs (NUXT_B7042). Nuxt 4.7 requires vue ^3.5.46, and npx nuxt upgrade --dedupe updates it along with Nuxt.
  • Template diagnostics are on, so you may see new NUXT_B4025 warnings. For a link to a server route, a file in public/ or another site, add the external prop.
  • With experimental.viteEnvironmentApi, the client and server build in parallel. If a Vite plugin reads the client build output from the server build, set experimental.parallelBuild: false.
  • globalThis.$fetch is only installed on the client when something uses it. If you read it somewhere Nuxt can't see at build time, set experimental.globalFetch: true.
  • @nuxt/rspack-builder and <NuxtClientFallback> are deprecated, in favour of @nuxt/rsbuild-builder and <NuxtErrorBoundary retry-on-client>.

✅ Upgrading

Our recommendation for upgrading is to run:

npx nuxt upgrade --dedupe

This will refresh your lockfile and pull in the latest dependencies Nuxt relies on, including Nuxt CLI 4.1, my-bad v1 and vite-plugin-checker v1.

If you'd like to try Nitro v3, read Testing Nitro v3 in the upgrade guide first.

👉 Read the full release post for more details and examples.

👉 Changelog

compare changes

🚀 Enhancements

  • nuxt: treat build flags as static plugin metadata (#37231)
  • nuxt: add experimental webmcp support for agent tools (#37195)
  • schema: widen listen hook server type for HTTP/2 (#37208)
  • kit: suggest "type": "module" when node reparses the config (#37205)
  • nuxt,schema,kit: report production builds through hooks (#37194)
  • nuxt: warn on server runtime config mutation in dev (#37076)
  • nuxt,schema: default noopener for navigateTo with open (#37075)
  • nuxt: export NuxtLinkSlotProps from nuxt/app (#37092)
  • nuxt: return an unregister function from addRouteMiddleware (#37080)
  • nuxt: expose clearBoundaryError from <NuxtErrorBoundary> (#37079)
  • nuxt: measure per-hook cpu time with async_hooks (#37052)
  • nitro,nuxt: add nitro v3 server builder (#37101)
  • nuxt: publish scan diagnostics as dev problem sets (#36969)
  • vite: publish vue compiler warnings as a dev problem set (#36967)
  • nitro,nuxt,vite: integrate problem sets, typecheck, and vite devtools with nuxt errors (#36918)
  • nuxt: catch server-side errors in <NuxtErrorBoundary> (#36990)
  • nuxt,vite-server: add render:document hook (#36989)
  • vite-server: describe the deploy target on the server build (#36964)
  • nuxt: add defineHandler from nuxt/server and set defineEventHandler as alias (#36929)
  • kit,nuxt,schema,vite-server: add portable renderer plugins (#36601)
  • vite-server: handle relative $fetch paths in-process with req context (#36919)
  • kit,nitro,nuxt,rspack,schema,webpack: add rsbuild builder (#36499)
  • nuxt: add experimental.globalFetch to always install the client $fetch global (97b8a0f48)
  • nuxt,kit: validate and coerce runtime config with standard schema (#36905)
  • schema: add dev option for typescript.typeCheck (#36164)
  • nuxt: add experimental.staticRoutes for greater perf (#36867)
  • nuxt: resolve template components in the vue compiler (#36763)
  • nuxt: add nuxt-aware template diagnostics (#36754)
  • nuxt,vite,webpack: add 'nosource' sourcemap option (#36534)
  • nuxt: type serverFetch against server routes (#36543)
  • nuxt: timeout + signal for onNuxtReady (#36743)
  • kit: store generated project build info buildDir (#36746)
  • nuxt: add finishColor prop to <NuxtLoadingIndicator> (#36533)
  • nuxt: add nuxt.request tracing channel (#36483)

🔥 Performance

  • nuxt: defer unhead for default error pages until an error renders (#37243)
  • nuxt: resolve page symlinks once per app structure (#37126)
  • nuxt: reuse the route tree when a page's contents change (#37161)
  • kit: skip unreachable excludes in app and server tsconfig (#37145)
  • nuxt: name default exports from the module record (#37122)
  • nuxt: forward payload prefetch hints without creating head (#37050)
  • nuxt: hoist static head of app.vue into server renderer (#37048)
  • nuxt: only include unhead in client bundle when used (#37035)
  • nuxt: tree-shake server head composables from client build (#37028)
  • nuxt: don't watch unused fetch keys, reuse payload links + match route rules 1x (#37078)
  • nuxt: keep importers when a composable edit keeps its exports (#37061)
  • nitro,kit,vite: only run babel on server modules with decorators (#37053)
  • vite: load @vitejs/plugin-vue-jsx on first jsx/tsx module (#37054)
  • vite,nuxt,kit,schema: build client and server concurrently (#37047)
  • nuxt: lazy-load bundler deps + start bundler import eagerly (#37045)
  • nuxt: skip vfs probing for relative ids outside vfs dirs (#37044)
  • nuxt: parse each module once in the keyed-functions transform (#37042)
  • nuxt: skip vue's own packages in composable tree-shaking (#37041)
  • nuxt: resolve each vue package once per build (#37038)
  • nuxt,vite: add native filters to more core transforms (#37039)
  • nuxt,schema: inline untyped so a default install has no jiti (#36805)
  • vite: scan app sources of every layer for dependency pre-bundling (#36777)
  • nuxt: import nuxt.schema files natively and read JSDoc with oxc (#37027)
  • nuxt: cache Intl formatters in <NuxtTime> (#37017)
  • nuxt: skip the route rules redirect middleware without redirects (#36995)
  • nuxt: avoid navigateTo in the client pages-less router (#36994)
  • nuxt: do not key cached payload urls on the build id (#36983)
  • nuxt: load default error template without defineAsyncComponent (#36985)
  • nuxt: skip payload plugin setup without payload extraction (#36986)
  • nuxt: drop ofetch from the client bundle when $fetch is unused (#35790)
  • nuxt: render nuxt links without a component instance (#36904)
  • nuxt: leave empty payload containers out of the inline payload (#36897)
  • nuxt: set page component names at build time (#36902)
  • nuxt: do not prefetch built-in error page chunks from the entry (#36898)
  • nuxt: do not refetch css inlined into the response (#36900)
  • nuxt: preload matched page chunks for client-only responses (#36901)
  • nuxt: skip head dom renders while updates are paused (#36899)
  • nuxt: skip modulepreload for the entry script (#36896)
  • nuxt: drop idle app manifest warm-up (#36903)
  • nuxt: transcode large non-latin1 html chunks to utf-8 with icu (#36892)
  • nuxt: reduce per-request server rendering overhead (#36890)
  • nuxt: resolve ssr nuxt link route lazily from a prototype getter (#36891)
  • nuxt: activate deferred prefetch hints in idle slices (#36878)
  • nuxt: keep deferred prefetch hints out of link headers (#36868)
  • vite: ensure static imports needed by entry are bundled with it (#36862)
  • nuxt: compile only client-side route rules into the app matcher (#36735)
  • nuxt: encode rendered html chunk by chunk (#36719)
  • nuxt: defer ssr prefetch hints until the app is ready (#36794)
  • vite: emit v8 compile hints for initial chunks (#36758)
  • nuxt: paint before hydrating and yield between boot phases (#36760)
  • nuxt: look up component names by file path (#36786)
  • vite: list ssr-styles imports without deserializing the AST (#36784)
  • nuxt: skip importing pages for island prefetch in dev (#36730)
  • nuxt: read render-list imports without building AST (#36787)
  • nuxt: memoise lazy route component imports on the server (#36773)
  • nuxt: optimise nuxt link ssr rendering (#36759)
  • nuxt: defer the prefetch connection listener until work is held (#36756)
  • nuxt: batch <NuxtLink> hooks in a single idle callback (#36755)
  • vite: skip tokenising modules without decorators (#36749)
  • kit: memoize normalized alias map (#36752)
  • nuxt: use @nuxt/devtools-onboard as a minimal devtools shim (#36581)
  • nitro,nuxt: ship bundled vue in server node_modules (#36819)

🩹 Fixes

  • nuxt,nitro,vite: match route rules for paths with repeated slashes (b5a243dfc)
  • vite: deny dev server access to nitro server output (38711ad5c)
  • nitro: apply route rules to payload urls (2bcefcce4)
  • nuxt: reject undeclared hasOwnProperty island prop with inheritAttrs: false (f9f9af215)
  • nuxt: extend reserved island root prop keys (64b35c893)
  • nitro: retry failed shared prerender data (#37244)
  • deps: update to nitropack v2.14 + drain dev workers (#37245)
  • kit: keep plugin identity when cloning resolved config (#37238)
  • nuxt: leave an object with a writeOnly property out of webmcp tool schema defaults (a571c73b7)
  • kit: resolve vue from the app rather than from nuxt (#37235)
  • nuxt: only add the diagnostics dev reporter in the browser (#37233)
  • nuxt: resolve the Nuxt app for server-rendered internal links (#37234)
  • nuxt: report the error behind a failed builder load (#37232)
  • vite,kit: report missing tsconfig and vue-tsc for type checking (#37230)
  • vite: stop logging build progress in the serial production build (#37229)
  • vite: time object-form plugin hooks in place (#37212)
  • nitro,vite-server: bundle #shared value imports in server build (#37209)
  • kit: improve hints/errors from loading nuxt.config files (#37210)
  • nitro: don't create the request body stream until it is read (#37129)
  • vite: skip orphaned CSS nodes in collectDevCss (#37207)
  • report thrown build diagnostics as errors (#37203)
  • kit,nitro: print build diagnostics through the nuxt logger (#37202)
  • webpack: print only compilation errors when a build fails (#37200)
  • kit,nitro,vite-server: make failed prerender output more readable (#37199)
  • webpack: transpile templates when buildDir is in node_modules (#37204)
  • vite-server: drop warnings users can't act on (#37198)
  • nuxt,nitro,vite-server: report prerender loops with a diagnostic (#37197)
  • kit,webpack: resolve aliased postcss plugins + offer to install missing ones (#37196)
  • webpack,rspack: strip leftover pure annotations from dead branches (#37193)
  • nuxt,nitro: keep internal dev plugins and handlers out of generated types. (#37162)
  • nuxt: don't end page loading while the page is still pending (#37165)
  • nuxt: give the dev badge a nonce added in render:html (#37148)
  • nuxt: include falsy body values in auto-generated cache key (#37183)
  • nitro: honour route rules reassigned after nitro is initialised (#37189)
  • nitro: more follow-up fixes for nitro v2 compat (#37184)
  • nuxt: match route rules in the app with nitro v3 pattern syntax (#37179)
  • schema: default nitroLegacy.imports to experimental.nitroAutoImports (#37180)
  • nuxt: apply hoisted type paths to the server tsconfig (#37181)
  • nitro: keep route rule keys as written (#37182)
  • nitro: attach dev server logs in streamed renders with nitropack (563572115)
  • nitro: attach dev server logs in streamed renders (#37174)
  • nuxt: honour page setup redirects when streaming (#37175)
  • nuxt: rerun callOnce after navigating away while it runs (#37149)
  • nuxt: include scanned nuxt state in vitest's module cache key (#37163)
  • nuxt: send cookies set before a streamed response starts (#37131)
  • nuxt: stop typing Parameters<typeof $fetch> options + export FetchOptions (#37172)
  • nuxt: declare variance of useFetch options route params (#37173)
  • nitro: follow-up fixes for nitro v2 compat (#37167)
  • nitro: keep noExternals + drop wasm conditions in vite ssr (#37156)
  • nuxt: render deferred prefetch hints as valid html (#37153)
  • nuxt: report masked useAsyncData errors to the server runtime (#37160)
  • kit: skip legacy base route for named catch-alls (#37155)
  • nitro: warn about missing public assets at build config time (#37157)
  • nitro: defer vite:compiled dev server reload until nitro has built (#37158)
  • nuxt: report each plugin metadata fallback once and skip dependencies (#37154)
  • nitro,nuxt: type routes written with cached handler helpers (#37143)
  • nuxt: type fetch responses on nitro v3 (32fb81920)
  • nuxt: type $fetch wrappers, named responses and its own parameters (#37152)
  • nitro: improve types for nitro v2 server code in legacy mode (#37142)
  • nitro,kit: resolve module server auto-imports + type app aliases in the server tsconfig (#37141)
  • nitro: follow accept for cached route errors on nuxt 4 + document headers rule order (#37140)
  • nitro: restore h3 v1 request behaviour in legacy mode (#37139)
  • nitro: provide nitro v2 build-time storage + mounts in legacy mode (#37138)
  • nitro: keep dotted server file suffixes nitro v2 accepted in legacy mode (#37137)
  • nitro: nitro v2 compat for error fields, redirect statusCode + callHook (#37136)
  • nitro: bundle non-js dependency files in dev + emit v2 render:before (#37135)
  • nitro: drop h3 v1 aliases + send nitro v2 cache-control for cached responses (#37134)
  • nitro: send no-cache for errors + convert null to 204 in nitro v2 handlers (#37133)
  • kit: include shared types from local layers (#37056)
  • kit: use atomic file writing when writing types (#36724)
  • webpack: emit dev server externals as file URLs (#37123)
  • respect directory boundaries when matching path prefixes (#37116)
  • nuxt: respect directory boundaries in layer alias matching (#37104)
  • nuxt: set context for onNuxtReady callback (#37109)
  • nitro: handle h3 v1 and nuxt v4 app shims (#37113)
  • nitro: include base url in nuxt 4 request url (#37112)
  • nitro,vite: deny dev server access to nitro dev output (#37110)
  • nitro: handle relative baseURL, dedupe unhead + pass strict paths for runtimeConfig (#37108)
  • nitro: resolve bundled @vue/* packages from their dependents (#37115)
  • nitro: keep h3/nitro auto-imports in module code w/o nitroAutoImports (#37114)
  • nuxt: correct misplaced @NO_SIDE_EFFECTS annotations (#37107)
  • nitro: address four more gaps in legacy mode (#37106)
  • nuxt: run useHydration setter when registered after app creation (#37099)
  • nuxt: treat scheme-only URLs such as https:host as external (#37093)
  • nuxt: fix asyncdata subscription + remove undefined payload keys (#37089)
  • nuxt: cancel an in-flight request superseded by a cache hit (#37081)
  • nuxt: report cookies that cannot be serialized with a diagnostic (#37073)
  • nuxt: make useResponseHeader read back writes (#37072)
  • nuxt: small useCookie client fixes (#37071)
  • nuxt: do not treat inherited object keys as asyncData or payload state (#37077)
  • nuxt: fix edge cases for error creation (#37068)
  • schema: parse deno config to detect workspace (#37070)
  • nuxt: make navigateTo open option a no-op on the server (#37032)
  • nitro,vite: fix issues with experimental decorators + jsx (#37051)
  • nitro: fix some nitro v3 builder bugs (#37105)
  • nitro: cover some gaps in compat mode (#37102)
  • nuxt,vite,webpack,rsbuild: support running the app on nitro v3 (#37100)
  • kit: load postcss plugins named by a directory subpath (#37062)
  • kit: resolve installed module package directories (#37069)
  • nuxt: use web-standard apis for nuxt/server without nitro (#37055)
  • nitro: validate the prerenderer's runtime config against its own schema (#37037)
  • nuxt: keep client-only placeholder when re-rendered before mount (#37014)
  • nuxt,vite,nitro: account for build time in the profile table (#36809)
  • nuxt: release useState init functions when scope is disposed (#37033)
  • nuxt: resolve layer aliases during dependency optimization (#37030)
  • nuxt: watch layer roots for nuxt.schema changes (#37031)
  • nuxt,nitro,vite: don't charge plugin hooks for nested this.resolve() time (#36798)
  • nuxt: run plugins whose dependsOn can't be resolved (#37026)
  • nuxt: remove useAsyncData abort listener by hand (#36729)
  • nuxt: re-announce identical consecutive useAnnouncer messages (#37023)
  • nuxt: avoid document access in useRouteAnnouncer during SSR (#37018)
  • nuxt: keep HTTP status of fetch errors caught by ssr boundary (#37010)
  • nuxt: do not expose details of thrown asyncData errors in prod (#37006)
  • vite: keep client optimizeDeps.include with user vite.ssr (#36876)
  • nitro: move h3 object form keys from NUXT_E8016 explanation to fix (c27a3c58e)
  • nuxt: settle asyncData promise when request is aborted externally (#37005)
  • nuxt: don't use static data for watch-triggered refresh (#37004)
  • nuxt: encode middleware redirect query like vue-router on server (#37002)
  • vite: track client and SSR entries separately for inline styles (#37003)
  • nuxt,nitro: pass renderer plugins the portable request event (ee35d7780)
  • nuxt: render <ClientOnly> fallback slots from vapor components (#36991)
  • nuxt: resolve never-hydrated chunks from precomputed renderer deps (#36987)
  • nuxt: parse and serialise queries the same way the router does (#36988)
  • nuxt: sort payload keys for deterministic serialisation (#36982)
  • nuxt,vite,webpack,rsbuild: resolve every vue import to a single copy (#36978)
  • vite: keep absolute paths for externalised shared/ imports (#36973)
  • nuxt: don't retain nuxt instance via global defineNuxtSchema (#36960)
  • nuxt: warn on duplicate page route names (#36922)
  • nuxt: keep browser's restored position on reload (#36957)
  • kit: only skip build: false plugins outside development (#36927)
  • nuxt: avoid replacer functions unsupported by rolldown's (#36946)
  • nuxt: drop static page meta overridden by runtime value (#36943)
  • nitro: copy island head arrays before merging entries (#36944)
  • kit: keep object runtime config when env var is null (#36917)
  • rsbuild: reject cross-site requests to the dev server (#36951)
  • nuxt: keep optional and (.*) params in ssrRoutes (#36998)
  • webpack: only inline styles for opted-in components within chunk (#36976)
  • webpack: respect inlineStyles when inlining styles of client components from source (94d9231ea)
  • nitro: prerender static SPAs with a relative base URL (#36913)
  • kit: accept Nuxt 5 in isNuxtMajorVersion (#36954)
  • nuxt: compare concrete route paths when detecting a page change (#36952)
  • kit: check the passed Nuxt instance in getNuxtModuleVersion (#36931)
  • nuxt: resolve inline route rule keys for nested pages w/ absolute paths (#36953)
  • nuxt: reset global regex filters in static parse helpers (#36941)
  • nuxt: do not forward conditional/range header to fetch subrequests (#36926)
  • nuxt: restore #build/fetch.mjs template (67900be44)
  • nuxt: leave links with a download attribute to the browser (#36906)
  • vite-server: leave browser globals to a deploy target's runtime (#36888)
  • vite-server: report dev request failures as diagnostics (#36889)
  • vite-server: detect a deploy target that sets the server input late (#36887)
  • nuxt,vite: strip control characters from raw dev error output (#36881)
  • nuxt: keep nitro route rules when merging inline route rules (#36885)
  • nuxt,nitro,vite: harden dev error report handling (#36880)
  • kit: pass full runtime config to nitro in updateRuntimeConfig (#36884)
  • vite-server: respond with a 500 to a dev request that throws (#36883)
  • vite-server: cloudflare vite plugin v2 support (#36879)
  • nuxt: watch shared/ for auto-import changes (#36855)
  • vite: bundle Vue dependencies to avoid absolute SSR paths (#36872)
  • nuxt: skip navigation repaint during view transition updates (#36844)
  • nuxt: process templates individually when debugging (#36808)
  • nuxt: reload when navigating to a payload from another build (#36863)
  • vite: apply browser global defines in dev ssr (#36856)
  • nuxt: exclude nuxt app dir from async data extraction by path (#36860)
  • schema: detect git worktrees and submodules as workspace roots (#36854)
  • nuxt: keep app manifest requests alive during page unload (#36842)
  • nuxt: absolutely resolve nitro/runtime-config and defu (d973ac095)
  • nuxt: resolve wildcard redirect targets in the route rules matcher (#36825)
  • nuxt: keep build cache file names longer than 100 bytes (#36843)
  • nitro: transform server auto-imports in node_modules layers (#36812)
  • nitro: always link dist to static output (#36592)
  • vite: allow ancestor node_modules in dev server (#36832)
  • vite: externalize ssr deps the same way regardless of import order (#36796)
  • vite: don't add css links if only shared with spa pages (#36789)
  • vite: fall back to node source maps for stack frames outside vite-node (#36833)
  • vite: resolve bare imports from component wrappers (#36785)
  • nuxt: preserve the types of multiple async data addons (#36791)
  • nuxt: replay lazy hydration interactions (#36838)
  • nuxt: support apps in <iframe srcdoc> documents (#36837)
  • nuxt: type island component props as json-serializable (#36814)
  • schema: force string type for devServer.host (60b903b95)

💅 Refactors

  • nuxt,vite: migrate deprecated envFile + transformInclude usage (#37242)
  • kit: match the kit source on main (76ed79412)
  • nuxt: share SFC script block and static expression helpers (#36955)
  • kit,nitro,vite-server: share spa loading template resolution (#36956)
  • webpack,rspack,rsbuild: share builder helpers and drop dead code (#36948)
  • nuxt: deduplicate announcer runtime and consolidate runtime tests (#36939)
  • nuxt: read route rules through getRouteRules in the runtime (#36937)
  • kit,schema: clean up and simplify (#36932)
  • vite: clean up and simplify (#36930)
  • nuxt: split core setup into feature files and share core helpers (#36935)
  • nuxt: split pages module and share component resolver helpers (#36936)
  • nitro,nuxt: split server renderer + dev error modules and consolidate tests (#36933)
  • nuxt: track template warnings by the latest compile of each file (1b600ed14)

📖 Documentation

  • exclude path-scoped server middleware in front of pages from security scope (13ce21770)
  • exclude reads by clients of an exposed dev server from security scope (fff1d77da)
  • document server imports must be explicit (0ac046209)
  • describe more nitro v3 differences on nuxt 4 (#37178)
  • note that useRequestFetch only forwards headers to paths starting with / (af584124b)
  • add nitroLegacy to the config reference (#37159)
  • update nitro v3 differences on nuxt 4 (84270166e)
  • note that nitroViteEnvironment is not supported with nitro v3 on Nuxt 4 (c101ce63c)
  • clarify how server-only page responses are cached (5eb4269f0)
  • drop regex constraint claim for route rules + link nitro v2 docs (f377936e3)
  • fix createUseAsyncData type signature and addon examples (#36472)
  • link $fetch at its new /docs/api/utils/$fetch path (#36980)
  • add an architecture and testing overview for contributors (#36961)
  • add image and font optimization in Get Started guides (#36959)
  • note that server middleware routes are case-sensitive (8095b358b)
  • clarify that nitro v2 middleware routes are path prefixes (4e04ba29b)
  • clarify that onPrehydrate does not accept a key from the user (c94f70be9)
  • add route rule warning (20a9513d4)
  • document NUXT_E8009 (f38447b8d)
  • note query-only links are also aria-current, and that a skip link needs no tabindex (#36511)

🏡 Chore

  • sync nitro v3 server mirror ref with main (3e66431b6)
  • reserve 4.x-only diagnostic code NUXT_B9017 (#37188)
  • reserve 4.x-only diagnostic codes (#37151)
  • fix typo in code comment (#36970)
  • improve benchmarks (#36859)
  • remove stale paths from codeql, eslint + schema config (#36977)
  • fix stale error template path in .gitattributes (3d40dd6d9)
  • tidy up unused tests + matrices (#36940)
  • kit: sync with main (fb563dcea)

✅ Tests

  • cover redirect, proxy and headers rules on payload urls (fd3d48b4a)
  • allow builder-specific routes when comparing typed dev routes (df0e949a2)
  • give the cached handler null cases distinct names (1c1e0b2f8)
  • run nitro-backed fixture suites on nitro v3 (954e55023)
  • use mocked clock in perf hook phase test (295f0d7c2)
  • avoid duplicate test names (33d1e905d)
  • cover removing and adding server plugins in dev (#36974)
  • cover a throwing route rules matcher + nuxt link edge cases (#36975)
  • share the fixture copy editor between vitest and playwright suites (#36958)
  • consolidate e2e suites and fixtures (#36950)
  • run fixture suites only in the matrix projects they depend on (#36949)
  • cover lazy hydration local bindings after script-like components (a745bf3e2)
  • update snapshots for 4.x (cb3e391e2)
  • retry fixture cleanup in fs-deny test (0a498303c)

🤖 CI

  • update agentscan config (209824dce)
  • replace agentscan action with the github app (199ec0ac7)
  • pin to current node minimum (dac4c5ea1)
  • run vapor e2e suites against vue 3.6 rc (#36992)
  • send test results to Flakiness.io from fork PRs (#36873)
  • also run on pushes to 4.x (139990e00)
  • check diagnostic code drift per PR (36ae9af16)
  • notify nuxt/translations on docs pushes (a3b96287c)

🎉 New Contributors

❤️ Contributors

Don't miss a new nuxt release

NewReleases is sending notifications on new releases.