MyGit

v3.0.0-rc.12

nuxt/nuxt

版本发布时间: 2023-01-20 05:21:26

nuxt/nuxt最新发布版本:v3.11.2(2024-04-05 00:06:42)

Originally published at https://github.com/nuxt/framework/releases/tag/v3.0.0-rc.12

💬 Release Discussion

🚀 How to Upgrade

Note Make sure to recreate the lock file in the project in case of any issues after the upgrade.

⭐ What is New?

📍 Route Rules

RC.12 comes with the first public beta for route rules and hybrid rendering support. Using route rules you can define rules for a group of nuxt routes, change rendering mode or assign a cache strategy based on route! Nuxt server will automatically register corresponding middleware and wrap routes with cache handlers using Nitro caching layer. Whenever possible, route rules will be automatically applied to the deployment platform's native rules (currently Netlify and Vercel are supported).

👉 See docs for examples and more info.

⚗️ Nitropack 0.6

Nitropack upgraded to 0.6 (Release Notes) and h3 upgraded to 0.8 (Release Notes)

⚠️ Breaking changes: Using defineEventHandler() or eventHandler() is now required. If you were previously using a Node.js middleware with (req, res, next?) syntax you need to wrap them with fromNodeMiddleware() to convert it into an h3 handler.

👦 useHead updates

This release brings a brand-new version of @vueuse/head with some significant performance improvements and bug fixes. Check out https://github.com/nuxt/framework/pull/8000 for more details, but in particular:

⚠️ Breaking changes: The shortcuts viewport and charset can only be used within nuxt.config and not within useHead directly. For more information on how to update, see https://github.com/nuxt/framework/pull/8000.

⚡ Page Meta

New router options validate and redirect are now supported directly in definePageMeta - so you can perform additional validation for dynamic routes, or implement route redirects directly within pages.

definePageMeta({
  // redirect: '/admin',
  validate: async (route) => {
    const nuxtApp = useNuxtApp()
    // Check if the id is made up of digits
    return /^\d+$/.test(params.id)
  }
})

🌅 Early Hints

Nuxt's node server renderer will now respond with 103 Early Hints before the server renders the app, meaning that you should see a decreased TTFB and earlier resource loading in a supported environment - which at the moment is Chrome with your Nuxt app served over HTTPS with newer than HTTP/1.1.

📖 Nuxt 3 Docs

Nuxt's documentation is now written with Nuxt 3's new theming system and the latest Docus and Content module versions. Check it out at https://v3.nuxtjs.org! Expect more coming soon!

nuxt 3 docs

Changelog

compare changes

🚀 Enhancements

🔥 Performance

🩹 Fixes

💅 Refactors

📖 Documentation

🌊 Types

🏡 Chore

⚠️ Breaking Changes

❤️ Contributors

相关地址:原始地址 下载(tar) 下载(zip)

查看:2023-01-20发行的版本