2022-08-24 16:04:56 +00:00
|
|
|
<template>
|
|
|
|
<div>You should not see me</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
2023-04-28 10:18:03 +00:00
|
|
|
if (useRoute().path === '/navigate-to-external') {
|
|
|
|
useNuxtApp().hook('app:rendered', () => {
|
|
|
|
throw new Error('this should not run')
|
|
|
|
})
|
|
|
|
}
|
2023-06-11 21:27:02 +00:00
|
|
|
await navigateTo({ path: 'https://example.com/', query: { redirect: false }, hash: '#test' }, { external: true, replace: true })
|
2022-08-24 16:04:56 +00:00
|
|
|
</script>
|