mirror of
https://github.com/tenrok/vue-meta.git
synced 2026-05-17 04:29:37 +03:00
fix #672: support passing in the ssr context as arg
This commit is contained in:
@@ -40,6 +40,7 @@ package-lock.json
|
||||
|
||||
# built code
|
||||
dist
|
||||
ssr
|
||||
lib
|
||||
es
|
||||
__build__
|
||||
|
||||
+1
-3
@@ -2,9 +2,7 @@ import { renderToString } from '@vue/server-renderer'
|
||||
import type { App } from 'vue'
|
||||
import type { SSRContext } from '@vue/server-renderer'
|
||||
|
||||
export async function renderToStringWithMeta (app: App): Promise<[string, SSRContext]> {
|
||||
const ctx: SSRContext = {}
|
||||
|
||||
export async function renderToStringWithMeta (app: App, ctx: SSRContext = {}): Promise<[string, SSRContext]> {
|
||||
const html = await renderToString(app, ctx)
|
||||
|
||||
// TODO: better way of determining whether meta was rendered with the component or not
|
||||
|
||||
Reference in New Issue
Block a user