mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 13:45:18 +00:00
docs: skip View Transitions API route middleware on server (#23935)
This commit is contained in:
parent
5fea172883
commit
6de4bcb75e
@ -428,7 +428,7 @@ If you are also using Vue transitions like `pageTransition` and `layoutTransitio
|
|||||||
|
|
||||||
```js
|
```js
|
||||||
export default defineNuxtRouteMiddleware(to => {
|
export default defineNuxtRouteMiddleware(to => {
|
||||||
if (!document.startViewTransition) { return }
|
if (import.meta.server || !document.startViewTransition) { return }
|
||||||
|
|
||||||
// Disable built-in Vue transitions
|
// Disable built-in Vue transitions
|
||||||
to.meta.pageTransition = false
|
to.meta.pageTransition = false
|
||||||
|
Loading…
Reference in New Issue
Block a user