diff --git a/src/ssr.ts b/src/ssr.ts index 94527f39..9f9106f3 100644 --- a/src/ssr.ts +++ b/src/ssr.ts @@ -1,10 +1,9 @@ import type { App } from 'vue' import type { SSRContext } from '@vue/server-renderer' -// rollup doesnt like an import as it cant find the export so use require -const { renderToString } = require('@vue/server-renderer') - export async function renderToStringWithMeta (app: App): Promise<[string, SSRContext]> { + const { renderToString } = await import('@vue/server-renderer') + const ctx: SSRContext = {} const html = await renderToString(app, ctx)