mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-16 02:44:51 +00:00
13 lines
358 B
Vue
13 lines
358 B
Vue
<template>
|
|
<div>You should not see me</div>
|
|
</template>
|
|
|
|
<script setup>
|
|
if (useRoute().path === '/navigate-to-external') {
|
|
useNuxtApp().hook('app:rendered', () => {
|
|
throw new Error('this should not run')
|
|
})
|
|
}
|
|
await navigateTo({ path: 'https://example.com/', query: { redirect: false }, hash: '#test' }, { external: true, replace: true })
|
|
</script>
|