Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.0 SSR document is not defined #764

Open
fallemand opened this issue May 20, 2022 · 2 comments
Open

3.0 SSR document is not defined #764

fallemand opened this issue May 20, 2022 · 2 comments

Comments

@fallemand
Copy link

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
Copy link

I also meet this problem

@Alexis2004
Copy link

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);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants