3.0 SSR document is not defined
fallemand opened this issue · 2 comments
fallemand commented
I'm trying to use the new alpha version of vue-meta
with Vue3 and SSR.
The problem is that server-side rendering is failing because the exported function relies on the document in SSR.
vue-meta/dist/vue-meta.cjs.js
=> Why is this file relying on document
?
Thanks!
liuweiwalliam commented
I also meet this problem
Alexis2004 commented
It seems that you should call createMetaManager
method with argument true
.
This will switch the library to SSR-compatible mode:
import { createMetaManager } from 'vue-meta';
...
const metaManager = createMetaManager(true);
...
app.use(metaManager);