async function getProdSsrTemplateFn (viteHtmlContent, quasarConf) {
  let html = injectSsrRuntimeInterpolation(viteHtmlContent)

  html = html.replace(
    entryPointMarkup,
    '<div id="q-app">{{ ssrContext._meta.runtimePageContent }}</div>'
  )

  if (quasarConf.build.minify !== false) {
    html = await minify(html, {
      ...quasarConf.build.htmlMinifyOptions,
      ignoreCustomFragments: [ ssrInterpolationsRE ]
    })
  }

  return compileTemplate(html, { interpolate: ssrInterpolationsRE, variable: 'ssrContext' })
}
Used by production SSR only

const viteHtmlContent = // ...vite client generated index.html
                        // which went through transformHtml() already

const fn = await getProdSsrTemplateFn(viteHtmlContent, quasarConf)

// ... at runtime:
const html = fn(ssrContext)