Skip to content

renderIndexHtml

function renderIndexHtml(uiDir, options): Promise<string>;

Defined in: src/server/render-index-html.ts:82

Read, inject into, and return the SPA index HTML from uiDir, or the fallback page when uiDir is undefined or has no index.html.

Parameter Type
uiDir string | undefined
options RenderIndexHtmlOptions

Promise<string>

const html = await renderIndexHtml(uiDir, {
globalName: "__WEBHOOKS_CONFIG__",
config: { title, basePath, readonly },
});