UNPKG

nuxt

Version:

Nuxt is a free and open-source framework with an intuitive and extendable way to create type-safe, performant and production-grade full-stack web applications and websites with Vue.js.

14 lines (13 loc) 456 B
import { getSSRStyles } from "./build-files.js"; export async function renderInlineStyles(usedModules) { const styleMap = await getSSRStyles(); const inlinedStyles = /* @__PURE__ */ new Set(); for (const mod of usedModules) { if (mod in styleMap && styleMap[mod]) { for (const style of await styleMap[mod]()) { inlinedStyles.add(style); } } } return Array.from(inlinedStyles).map((style) => ({ innerHTML: style })); }