UNPKG

utquidem

Version:

The meta-framework suite designed from scratch for frontend-focused modern web development.

15 lines (9 loc) 357 B
import { ServerStyleSheet } from '@modern-js/runtime-core/styled'; import { RenderHandler } from './type'; export const toHtml: RenderHandler = (jsx, renderer, next) => { const sheet = new ServerStyleSheet(); const html = next(sheet.collectStyles(jsx)); const css = sheet.getStyleTags(); renderer.result.chunksMap.css += css; return html; };