v4.4.0
📦 nuxtView on GitHub →
✨ 10 features⚡ 1 deprecations🔧 11 symbols
Summary
This release introduces powerful customization for data fetching hooks via `createUseFetch`/`createUseAsyncData`, upgrades to Vue Router v5, and adds typed layout props. It also significantly improves accessibility with `useAnnouncer` and boosts dev performance by migrating route generation to `unrouting`.
Migration Steps
- If you were using `unplugin-vue-router` directly, remove it from your dependencies.
✨ New Features
- Introduction of `createUseFetch` and `createUseAsyncData` to create custom instances of `useFetch` and `useAsyncData` with default options.
- Upgrade to Vue Router v5, removing the dependency on `unplugin-vue-router`.
- Support for passing typed layout props directly from `definePageMeta`.
- New `useAnnouncer` composable and `<NuxtAnnouncer>` component for announcing dynamic in-page changes to screen readers.
- Migration of file-system route generation to `unrouting` for faster dev server changes.
- New experimental `payloadExtraction: 'client'` mode to inline the full payload in the initial HTML response for cached routes.
- Runtime in-memory LRU payload cache to prevent unnecessary SSR re-renders on `_payload.json` requests.
- New `refresh: true` option for `useCookie` to extend a cookie's expiration without changing its value.
- `useState` and `clearNuxtState` now support resetting state to the initial value provided in the factory function instead of `undefined`.
- Improved import protection showing suggestions and a full trace of problematic server-only imports.
Affected Symbols
⚡ Deprecations
- If you're using `unplugin-vue-router` directly, you can remove it from your dependencies due to the upgrade to Vue Router v5.