Nuxt 3.11 update brings improved logging, preview mode and other enhancements
Nuxt, the widely recognized Vue framework, has announced the release of its version 3.11. This update brings about several enhancements including improved logging, a preview mode, server pages, and a host of other features.
In Nuxt 3.11, server logs related to a request are bundled and passed to the client, where they can be viewed in the browser console. This is facilitated by an asynchronous context that tracks and associates the logs with the triggering request. The Nuxt team has also indicated plans to support streaming of subsequent logs to Nuxt DevTools.
The introduction of a new usePreviewMode composable aims to simplify the use of preview mode in a Nuxt application. When this mode is activated, all data fetching composables such as useAsyncData and useFetch are rerun, bypassing any cached data in the payload.
Nuxt 3.11 introduces automatic cache-busting for payloads, provided the Nuxt app manifest has not been disabled. This ensures that users are not left with outdated data following a deployment. The update also allows users to define middleware for page paths within the Vue app section of their application.
Additional features of Nuxt 3.11 include a new clear data fetching utility, a new #teleports target, loading indicator and transition controls, server- and client-only pages, performance enhancements, bug fixes, and more.