import type { Plugin } from "vite"; /** * Vite plugin that injects compiled theme CSS as a global constant. * * Equivalent of the webpack `injectThemeCss` export from `@webiny/website-builder-nextjs/webpack`, * but targeting Vite / Nuxt projects. * * The plugin reads `entry` (a CSS file), inlines all `@import` statements via PostCSS, then * exposes the result as the constant `variableName` (default: `__THEME_CSS__`). Use it in your * theme definition: * * ```ts * // src/theme/theme.ts * declare const __THEME_CSS__: string; * export const theme = createTheme({ css: __THEME_CSS__, fonts: [...], ... }); * ``` * * Register in `nuxt.config.ts`: * * ```ts * import { injectThemeCss } from "@webiny/website-builder-nuxt/vite"; * * export default defineNuxtConfig({ * vite: { * plugins: [await injectThemeCss("./src/theme/theme.css")] * } * }); * ``` * * In development mode the plugin watches the entry file and restarts the Vite dev server * automatically when the CSS changes (required because Vite evaluates `define` replacements * at server startup rather than on every request). */ export declare const injectThemeCss: (entry: string, variableName?: string) => Promise;