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-nodefallback to use the SPA entry point (3.x), inlines CSS for lazy components imported from#components, extracts server page CSS wheninlineStylesis disabled, and preserves backslash separators in Windows named pipe paths. - Kit & Nuxt: Passes error as
causewhen re-throwing exceptions. - Nuxt: Validates the fallback tag name; emits auto-import paths as files (not directories); suppresses spurious slot warnings in
NuxtPageduring navigation; detaches in-flight promises onuseAsyncDatateardown to prevent memory leaks; respects per-pagekeepaliveset viadefinePageMeta; alignsuseFetcherror type with runtime; unwraps getter body inuseFetch; guards against-1when unregistering a router hook; cleans up load/error listeners inpreloadPayload; 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
PUREannotations.
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.