Nuxt 3.21.9 Patch Release Fixes Vite, Data Fetching, and Router Hooks

Nuxt / Vue · 18 Jul 2026 · 2 min read

#nuxt

Nuxt has released v3.21.9, a patch release addressing multiple bugs across the framework. The update focuses on improving Vite integration, refining useAsyncData and useFetch behavior, and ensuring robust router and component handling.

Key changes include:

  • Vite: Fixes vite-node fallback to use the SPA entry point (3.x), inlines CSS for lazy components imported from #components, extracts server page CSS when inlineStyles is disabled, and preserves backslash separators in Windows named pipe paths.
  • Kit & Nuxt: Passes error as cause when re-throwing exceptions.
  • Nuxt: Validates the fallback tag name; emits auto-import paths as files (not directories); suppresses spurious slot warnings in NuxtPage during navigation; detaches in-flight promises on useAsyncData teardown to prevent memory leaks; respects per-page keepalive set via definePageMeta; aligns useFetch error type with runtime; unwraps getter body in useFetch; guards against -1 when unregistering a router hook; cleans up load/error listeners in preloadPayload; and avoids idle wait when refreshing data after hydration.
  • Nitro: Includes nested layers in Nitro transforms and exports an empty styles object when ssr: false.
  • Rspack & Webpack: Strips invalid Webpack PURE annotations.

These fixes significantly improve developer experience by making data fetching more reliable, reducing spurious warnings, and ensuring cross-platform compatibility (e.g., Windows named pipes). The Vite enhancements also streamline CSS handling for lazy components and SSR scenarios. Upgrading is recommended to avoid edge-case issues in production applications.

Source: https://github.com/nuxt/nuxt/releases/tag/v3.21.9

Related

auto-curated · source linked above ← all news