@nuxt/rspack-builder
4.6.4 · 2 Nov 2026MIT590 / weekRepositoryHomepagenpmAtom feed
3.21.11 is the newest release of 3.x.
In short
12 new4 faster11 fixed35 internal
Security
2 advisories affect 3.18.0; 3.21.7 fixes them
- Moderate@nuxt/webpack-builder and @nuxt/rspack-builder dev server same-origin check bypassed when Sec-Fetch-Site, Origin, and Referer are all absent (incomplete fix for GHSA-6m52-m754-pw2g)GHSA-x6qj-4h56-5rj5 · 16 Jun 2026Fixed in 3.21.7
- ModerateNuxt: Dev server exposes built source over LAN to malicious sites (incomplete fix for GHSA-4gf7-ff8x-hq99)GHSA-6m52-m754-pw2g · 19 May 2026Fixed in 3.21.6
Release note
3.18.0 is the next minor release.
Highlights
A huge thank you to everyone who's been a part of this release, which is mostly about backporting features + bugfixes from Nuxt v4.
Over the next six months, we'll continue backporting compatible v4 features and bug fixes, so please keep the feedback coming! ❤️
Lazy Hydration Macros
Building on the delayed hydration support from v3.16, we now support lazy hydration macros (#31192)! These provide a more ergonomic way to control component hydration:
<script setup lang="ts">
const LazyHydrationMyComponent = defineLazyHydrationComponent(
'visible',
() => import('./components/MyComponent.vue')
)
</script>
<template>
<div>
<!--
Hydration will be triggered when
the element(s) is 100px away from entering the viewport.
-->
<LazyHydrationMyComponent :hydrate-on-visible="{ rootMargin: '100px' }" />
</div>
</template>These macros make it possible to use Nuxt's lazy hydration utilities alongside explicit component imports.
Accessibility Improvements
We've enhanced accessibility by including <NuxtRouteAnnouncer> in the built-in app.vue (#32621). This means page changes will be announced to screen readers, making navigation more accessible for users with visual impairments. (This only applies if you do not have an app.vue in your project. If you do, please keep <NuxtRouteAnnouncer> in your app.vue!)
Enhanced Development Experience
Chrome DevTools Workspace Integration
We've added Chrome DevTools workspace integration (#32084), allowing you to edit your Nuxt source files directly from Chrome DevTools. This creates a better debugging experience where changes made in DevTools are reflected in your actual source files.
Better Component Type Safety
Component type safety has been improved with:
Typed slots for
<ClientOnly>and<DevOnly>(#32707) - better IntelliSense and error checkingExported
<NuxtTime>prop types (#32547) - easier to extend and customize
New Auto-Import: onWatcherCleanup
The onWatcherCleanup function from vue is now available as an auto-import (#32396), making it easier to clean up watchers and prevent memory leaks:
const { data } = useAsyncData('users', fetchUsers)
watch(data, (newData) => {
const interval = setInterval(() => {
// Some periodic task
}, 1000)
// Clean up when the watcher is stopped
onWatcherCleanup(() => {
clearInterval(interval)
})
})Observability Enhancements
Page routes are now exposed to Nitro for observability (#32617), enabling better monitoring and analytics integration with supported platforms. This allows observability tools to track page-level metrics more effectively.
Module Development Improvements
Module authors get several quality-of-life improvements:
Simplified Server Imports
The addServerImports kit utility now supports single imports (#32289), making it easier to add individual server utilities:
// Before: had to wrap in array
addServerImports([{ from: 'my-package', name: 'myUtility' }])
// Now: can pass directly
addServerImports({ from: 'my-package', name: 'myUtility' })TypeScript Configuration
Modules can now add to typescript.hoist (#32601), giving them more control over TypeScript configuration and type generation.
Performance Improvements
We've made several performance optimizations:
Improved Vite-node communication via internal socket (#32417) for faster development builds
Migration to
oxc-walker(#32250) and oxc foronPrehydratetransforms (#32045) for faster code transformations
Bug Fixes
This release also includes several important fixes:
Improved data fetching: When computed keys change, old data is now properly retained
Better scroll behavior:
scrollBehaviorTypeis now only used for hash scrollingFixed directory aliases: Added trailing slashes to some directory aliases for better consistency
Upgrading
As usual, our recommendation for upgrading is to run:
npx nuxi@latest upgrade --dedupe
This refreshes your lockfile and pulls in all the latest dependencies that Nuxt relies on, especially from the unjs ecosystem.
Changelog
Enhancements
nuxt: Expose page routes to nitro for o11y
nuxt: Export
<NuxtTime>prop typesnuxt: Add integration with chrome devtools workspaces
kit: Support single import in
addServerImportsnuxt: Add
onWatcherCleanupto imports presetsnuxt: Add route announcer to default app.vue
nuxt: Support lazy hydration macros
Performance
vite: Communicate with vite-node via internal socket
kit: Update env expansion regex to match nitro
Fixes
nuxt: Allow modules to add to
typescript.hoistnuxt: Retain old data when computed key changes
nuxt: Only use
scrollBehaviorTypefor hash scrollingnuxt: Add missing
asyncnuxt: Fix transform/minify types + bump oxc-transform
nuxt: Provide typed slots for
<ClientOnly>and<DevOnly>kit,nuxt,schema: Add trailing slash to some dir aliases
nuxt: Include source base url for remote islands
vite: Use vite node server to transform requests
kit: Use
mllyto parse module pathsnuxt: Execute all plugins after error rendering error.vue
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.