Nuxt/test/fixtures/basic/modules/runtime/page.vue
Daniel Roe 566fa85fc8
fix(nuxt): run page meta plugin on all pages (and only pages) (#20628)
Co-authored-by: Julien Huang <julien.huang@outlook.fr>
2023-05-03 15:14:12 +01:00

18 lines
304 B
Vue

<script setup lang="ts">
import { setResponseHeader } from 'h3'
definePageMeta({
value: 'added in pages:extend'
})
if (process.server) {
setResponseHeader(useRequestEvent(), 'x-extend', useRoute().meta.value as string)
}
</script>
<template>
<div>
added in pages:extend
</div>
</template>