Closed renovate[bot] closed 1 year ago
This PR contains the following updates:
^3.3.1
^3.5.0
^4.0.0
^4.0.1
7.30.0
7.32.4
This PR contains the following updates:
^3.3.1
->^3.5.0
^4.0.0
->^4.0.1
7.30.0
->7.32.4
Release Notes
nuxt/nuxt
### [`v3.5.0`](https://togithub.com/nuxt/nuxt/releases/tag/v3.5.0) [Compare Source](https://togithub.com/nuxt/nuxt/compare/v3.4.3...v3.5.0) > 3.5.0 is a minor (feature) release with lots of new features to play with. #### π Highlights ##### β‘οΈ Vue 3.3 released! Vue 3.3 has been released, with lots of exciting features, particularly around type support. This also brings a significant improvement to data fetching when navigating between nested pages ([https://github.com/nuxt/nuxt/pull/20777](https://togithub.com/nuxt/nuxt/pull/20777)), thanks to [@antfu](https://togithub.com/antfu) and [@baiwusanyu-c](https://togithub.com/baiwusanyu-c). - new `defineOptions` macro - 'generic' components - typed slots and using external types in defineProps - ... and more Read **[the full release announcement](https://blog.vuejs.org/posts/vue-3-3)** for more details. ##### π Nitropack v2.4 We've been working on lots of improvements to Nitro and these have landed already in Nitro v2.4 - you may already have this upgrade, which contains a lot of bug fixes, updates to the module worker format for Cloudflare, Vercel KV support and more. One note: if you're deploying to Vercel or Netlify and want to benefit from incremental static regeneration, you should now update your route rules: ```diff routeRules: { -- '/blog/**': { swr: 3000 }, ++ '/blog/**': { isr: 3000 }, } ``` Read **[the full release notes](https://togithub.com/unjs/nitro/releases/tag/v2.4.0)**. ##### π New defaults **Rich JSON payload serialisation** is now enabled by default ([https://github.com/nuxt/nuxt/pull/19205](https://togithub.com/nuxt/nuxt/pull/19205), [https://github.com/nuxt/nuxt/pull/20770](https://togithub.com/nuxt/nuxt/pull/20770)). This is both faster and allows serialising complex objects in the payload passed from the Nuxt server to client (and also when extracting payload data for prerendered sites). This now means that **various rich JS types are supported out-of-the-box**: regular expressions, dates, Map and Set and BigInt as well as NuxtError - and Vue-specific objects like `ref`, `reactive`, `shallowRef` and `shallowReactive`. You can find [an example](https://togithub.com/nuxt/nuxt/blob/main/test/fixtures/basic/pages/json-payload.vue) in our test suite. This is all possible due to [Rich-Harris/devalue#58](https://togithub.com/Rich-Harris/devalue/pull/58). For a long time, Nuxt has been using our own fork of devalue owing to issues serialising Errors and other non-POJO objects, but we now have transitioned back to the original. You can even register your own custom types with a new object-syntax Nuxt plugin: ```ts [plugins/custom-payload-type.ts] export default definePayloadPlugin(() => { definePayloadReducer('BlinkingText', data => data === 'You can see a demo on https://nuxt-view-transitions.surge.sh You may have noticed that Chromium-based browsers now ship a new web platform API: the [**View Transitions API**](https://developer.chrome.com/docs/web-platform/view-transitions/). This is an exciting new ability for native browser transitions which (among other things) have the ability to transition between unrelated elements on different pages. Nuxt now ships with an experimental implementation, which will be under active development during the v3.4 release cycle. See the known issues in the [linked PR](https://togithub.com/nuxt/nuxt/pull/20092). ```ts export default defineNuxtConfig({ experimental: { viewTransition: true } }) ``` ##### β¨ Payload Enhancements We've merged a **[significant change to how Nuxt handles payloads](https://togithub.com/nuxt/nuxt/pull/19205)** (under an experimental flag). Payloads are used to send data from the server to the client when doing server-side rendering and avoid double data-fetching during the hydration phase. ```ts [nuxt.config.ts] export default defineNuxtConfig({ experimental: { renderJsonPayloads: true } }) ``` With this new option enabled, this now means that **various rich JS types are supported out-of-the-box**: regular expressions, dates, Map and Set and BigInt as well as NuxtError - and Vue-specific objects like `ref`, `reactive`, `shallowRef` and `shallowReactive`. You can find [an example](https://togithub.com/nuxt/nuxt/blob/main/test/fixtures/basic/pages/json-payload.vue) in our test suite. This is all possible due to [Rich-Harris/devalue#58](https://togithub.com/Rich-Harris/devalue/pull/58). For a long time, Nuxt has been using our own fork of devalue owing to issues serialising Errors and other non-POJO objects, but we now have transitioned back to the original. You can even register your own custom types with a new object-syntax Nuxt plugin: ```ts [plugins/custom-payload-type.ts] export default definePayloadPlugin(() => { definePayloadReducer('BlinkingText', data => data === '