mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 16:43:55 +00:00
19 lines
361 B
Vue
19 lines
361 B
Vue
<script setup lang="ts">
|
|
definePageMeta({
|
|
middleware: () => {
|
|
if (import.meta.server || useNuxtApp().isHydrating) { return }
|
|
return abortNavigation({
|
|
fatal: true,
|
|
})
|
|
},
|
|
})
|
|
const router = useRouter()
|
|
onNuxtReady(() => router.push({ path: '/middleware-abort', force: true }))
|
|
</script>
|
|
|
|
<template>
|
|
<div>
|
|
<!-- -->
|
|
</div>
|
|
</template>
|