vikejs / vike-vue

🔨 Vue integration for Vike
https://vike.dev/vike-vue
MIT License
40 stars 6 forks source link

`vike-vue-unhead` #183

Open brillout opened 3 months ago

brillout commented 3 months ago

There is already an example of using Vike with vue-unhead here.

It'd be nice to have an extension that automatically integrates vue-unhead.

Curious: with the latest improvements to head management, is there a rationale for using vue-unhead?

TimJohns commented 3 months ago

Thanks - I am out for a week, but will take a look when I get back. I don't know if we need a specific integration for unhead, but going from memory, last time I tried unhead with vikeVue, it was incompatible (or at least not trivial) because the create app hook is called twice (once for the Page and once for the Head), so unhead's state was reset.

brillout commented 3 months ago

because the create app hook is called twice

I guess we can create a flag for this e.g. pageContext.isRenderingHead.

brillout commented 3 months ago

because the create app hook is called twice

I guess we can create a flag for this e.g. pageContext.isRenderingHead.

Done and pre-released as vike-vue@0.8.2-commit-9ffa550.

Let me know if you need anything else.