This repository has been archived by the owner on Apr 6, 2023. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Beta Testing
Switch to the edge channel.
⭐ What is New?
⚗️ Nitropack@0.6 and h3@0.8
Nitropack upgraded to 0.6. [Release Notes]
Using
defineEventHandler
is now required. If you were previously using Node.js middleware(req, res, next?)
you need to wrap them withfromNodeMiddleware()
to convert into h3 handler.📍 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 vertical are supported).
redirect
- Define server-side redirects.ssr
- Disables server-side rendering for sections of your app and make them SPA-only withssr: false
cors
- Automatically adds cors headers withcors: true
- you can customize the output by overriding withheaders
headers
- Add specific headers to sections of your site - for example, your assetsstatic
andswr
-static
enables a single (on-demand) build;swr
enables a static build, that lasts for a configurable TTL. (currently enables full incremental static generation on netlify, with Vercel coming soon)🧪 Route rules are still under active development, and subject to change.
Some examples:
👦
useHead
updatesThis release brings a brand-new version of
@vueuse/head
with some significant performance improvements and bug fixes. Check out #8000 for more details, but in particular:useHead
The shortcuts
viewport
andcharset
can only be used withinnuxt.config
and not withinuseHead
directly. For more information on how to update, see #8000.📖 Page Meta
New router options
validate
andredirect
are now supported directly indefinePageMeta
- so you can perform additional validation for dynamic routes, or implement route redirects directly within pages.🌅 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!
Changelog
compare changes
🚀 Enhancements
redirect
within page metadata (#7746)--dotenv
fordev
,build
andpreview
commands (#7660)<NuxtLoadingIndicator>
(#7128)validate
hook fordefinePageMeta
(#7870)serverDir
(#7868)#components
client exports with createClientOnly (#7412)ssr: false
route rule to enable SPA mode (#7938)@vueuse/head
(#8000)<NuxtPage>
to#components
(#8145)nuxi build-module
command (#7610)routesRules
shortcut (#7954)addVitePlugin
andaddWebpackPlugin
(#8270)🔥 Performance
vue-router
dependency from minimal app (#8188)🩹 Fixes
clearNuxtData
(#7710)workspaceDir
in tsconfig include (#7726)defineNuxtConfig
fornuxi info
(#7728)useFetch
(#7720)baseURL
when rendering payload path (#7809)noScripts
(#7745)^16.11.0
requirement to^16.10.0
(#7865)ssr: false
(#7930)setupTimeout
(#7866).client
components (#7422)createClientOnly
(#7774)index.html
with a server (#7831)untyped
dependency (#8064)lazyHandle
withdefineLazyHandler
(#8049)ssr: false
(#8106)refresh
to override previous requests by default (#8190)app/router.options.ts
file is present (#8193)workspaceDir
in tsconfig by default (#8256)💅 Refactors
unref
inlayout.ts
(#7818)unref
infetch.ts
(#7813)<Script>
component tag in template (#8197)writeEarlyHints
fromh3
(#8245)getRouteRules
from nitropack (#8251)📖 Documentation
useError()
type definition (#7749)nuxt/auth
(#7781): ?
(#7928)definePageMeta
docs (#7888)transitions
page (#7987)webp
for 3D gem asset (93c3f30b)website-theme@0.1.6
(3218356d)definePageMeta
(c804daa0)NuxtHooks
source (#8128)RouterConfig
interface in examples (#8151)validate
example (#8231)useBody
withreadBody
(#8266)button-link
(#8275)🌊 Types
nuxt-link
target types (#8172)🏡 Chore
<NuxtPage>
to#components
(#8145)refresh
to override previous requests by default (#8190)❤️ Contributors
u
e