Change8

v4.2.2

📦 nuxtView on GitHub →
3 features🐛 10 fixes🔧 6 symbols

Summary

Nuxt 4.2.2 is a patch release focusing on Nitro error handling, useAsyncData reliability, and improved TypeScript support for layers and test files.

Migration Steps

  1. Run 'npx nuxt upgrade --dedupe' to upgrade and deduplicate the lockfile.

✨ New Features

  • Added TypeScript path alias support for test files in @nuxt/kit.
  • Added support for moduleDependencies in installModule.
  • Added MCP server and llms.txt to documentation assets.

🐛 Bug Fixes

  • Nitro: Disabled pretty error handler during testing and ensured HTML is a string before injection.
  • Nuxt: Generated valid references for component declaration items.
  • Nuxt: Synced internal route before calling page:finish hook.
  • Nitro: Included layer server directories in tsconfig.server.json.
  • Nuxt: Ensured deduped async data executions return the latest promise.
  • Nuxt: Resolved watch callback after reactive key change in useAsyncData.
  • Nuxt: Re-execute callOnce during Hot Module Replacement (HMR).
  • Nuxt: Escaped HTML in development error page stack traces.
  • Kit: Prevented adding resolved rootDir to cached layer config.
  • Schema: Ignored .d.vue.ts declarations to avoid conflicts.

🔧 Affected Symbols

useAsyncDatacallOnceinstallModulepage:finishmoduleDependenciestsconfig.server.json