Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
vue-meta, JSS, SSR
.then((app) => {
const renderer = createRenderer();
return renderer.renderToString(app).then((content) => ({ content, app })); // `renderToString` returns a promise
})
.then(({ content, app }) => {
const meta = app.$meta().inject();
const serverComponent = new Vue({
render(createElement) {
return createElement(ServerHtml, {
props: {
content,
initialState: validRouteOrNull,
distPath: __BUNDLE_OUTPUT_PATH__,
meta, // pass the meta object as prop to `ServerHtml`
},
});
},
});
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment