mirror of
https://github.com/nuxt/nuxt.git
synced 2024-12-05 03:47:12 +00:00
15 lines
358 B
Vue
15 lines
358 B
Vue
|
<template>
|
||
|
<div>You should not see me</div>
|
||
|
</template>
|
||
|
|
||
|
<script setup>
|
||
|
definePageMeta({
|
||
|
alias: ['/setup-should-not-run'],
|
||
|
middleware: to => to.path === '/navigate-to-error' ? navigateTo('/setup-should-not-run') : undefined
|
||
|
})
|
||
|
console.log('running setup')
|
||
|
useNuxtApp().hook('app:rendered', () => {
|
||
|
throw new Error('this should not run')
|
||
|
})
|
||
|
</script>
|