import type { Component } from 'vue'; import { renderToString } from '@vue/server-renderer'; import { createSSRApp, h as createElement } from 'vue'; export function __vue_static(VueComponent: Component) { return async (attrs: Record, ...children: any): Promise => { const app = createSSRApp({ components: { VueComponent }, render() { return createElement(VueComponent as any, attrs); } }); const html = await renderToString(app); return html; }; } export function __vue_dynamic(VueComponent: Component, importUrl: string, vueUrl: string) { const placeholderId = `placeholder_${String(Math.random())}`; return (attrs: Record, ...children: any) => { return `
`; }; }