unjs / unhead

Unhead is the any-framework document head manager built for performance and delightful developer experience.
https://unhead.unjs.io
MIT License
639 stars 41 forks source link

Overwritten head (SSR) when using wildcard path! #402

Open MasihTak opened 2 months ago

MasihTak commented 2 months ago

Environment

Node v21.7.3 "@unhead/schema-org": "^1.9.16", "@unhead/ssr": "^1.9.16", "@unhead/vue": "^1.9.16", "express": "^4.19.2", "vue": "^3.4.38", "vue-router": "^4.4.3",

Reproduction

Create a page and a wildcard path using the following code:

 {
        path: '/:notFound(.*)',
        component: () => import('@/views/NotFound.vue'),
    }

Then, within the page NotFound add the useServerHead or useHead with the desired title.

Describe the bug

The wildcard page will take the place of the title and any other meta data given in useServerHead of other pages in SSR!

Additional context

No response

Logs

No response

harlan-zw commented 2 months ago

Hi, can you please provide a reproduction?