v3.21.0
📦 nuxtView on GitHub →
✨ 9 features🔧 3 symbols
Summary
Nuxt 3.21.0 introduces powerful features like route rule layouts, enhanced ISR/SWR payload extraction, and improved developer experience with a draggable error overlay. This release also extends support for Nuxt v3 until mid-2026.
Migration Steps
- If you rely on route-level authorization, consider using the new route groups exposed in page meta instead of adding `definePageMeta` to every protected page.
✨ New Features
- Route rules now support setting layouts directly using the new `appLayout` property in `nuxt.config.ts`. This allows for centralized, declarative layout management.
- Payload extraction now supports ISR, SWR, and cached route rules, enabling client-side navigation to use cached payloads and allowing CDNs to cache payload files.
- Payload extraction now works in development mode when `nitro.static` is true or for pages with `isr`, `swr`, `prerender`, or `cache` route rules.
- Modules in Nuxt layers can now be disabled by setting their configuration to `false` in `nuxt.config.ts` when extending a layer.
- Route groups (folders wrapped in parentheses like `(protected)/`) are now exposed in page meta, accessible via `useRoute().meta.groups`.
- The `setPageLayout` composable accepts an optional second parameter to pass props directly to the layout component.
- A new `#server` alias is available for clean imports within the server directory, providing import protection against client/shared contexts.
- The development error overlay is now draggable, snaps to screen edges, and can be minimized, with state persisting across page reloads.
- Module authors can use async functions when adding build plugins via `addVitePlugin` or `addWebpackPlugin` to enable true lazy loading of plugins.