Change8

v3.16.0

Breaking Changes
📦 nuxtView on GitHub →
1 breaking8 features🐛 3 fixes1 deprecations🔧 5 symbols

Summary

Nuxt v3.16 introduces native lazy hydration, an upgraded Devtools v2, and significant performance improvements through new module resolution logic. It also transitions to Unhead v2 for head management and introduces a streamlined 'create-nuxt' CLI tool.

⚠️ Breaking Changes

  • Upgraded to Unhead v2. While a compatibility build is provided for Nuxt 3, direct imports from '@unhead/vue' may lose async context. Users should switch to Nuxt auto-imports or '#app/composables/head'.

Migration Steps

  1. Update Nuxt to v3.16.
  2. If using Unhead directly, update imports from '@unhead/vue' to Nuxt auto-imports or '#app/composables/head'.
  3. If using compatibilityVersion: 4, review the specific Unhead v2 upgrade guide.
  4. Optional: Replace 'nuxi init' with 'npm create nuxt' for new projects.

✨ New Features

  • New 'create-nuxt' CLI tool for faster project initialization.
  • Native delayed/lazy hydration support using Vue hydration strategies (hydrate-on-visible, hydrate-on-idle, hydrate-on-interaction, hydrate-on-media-query, hydrate-after).
  • Nuxt Devtools v2 with custom editor selection, Discovery.js integration, and module config tracking.
  • Advanced pages configuration via 'pages.pattern' to filter scanned files.
  • Granular debug logging options in 'nuxt.config.ts'.
  • Experimental support for decorators.
  • Named layer aliases (e.g., #layers/layer-name) for auto-scanned and manually named layers.
  • Performance boosts via 'exsolve' for module resolution and 'oxc-parser' for plugins.

🐛 Bug Fixes

  • Eliminated duplicated Nitro alias resolution.
  • Fixed error pages not appearing correctly on island page errors.
  • Improved source tracking and file location info for undefined useAsyncData calls.

🔧 Affected Symbols

useHeadinjectHeaduseAsyncDataloadNuxtdefineNuxtConfig

⚡ Deprecations

  • Unhead v2 removes internal deprecations from the previous version.