UNPKG

@unocss/astro

Version:

UnoCSS integration for Astro

31 lines (30 loc) 1.15 kB
import { VitePluginConfig } from "@unocss/vite"; import { UserConfigDefaults } from "@unocss/core"; import { AstroIntegration } from "astro"; //#region src/index.d.ts interface AstroIntegrationConfig<Theme extends object = object> extends VitePluginConfig<Theme> { /** * Include reset styles * When passing `true`, `@unocss/reset/tailwind.css` will be used * * Note: When using `presetWind4`, the reset is handled by the preset itself * via `preflights.reset` (enabled by default). In this case, the old Wind 3 * reset (`@unocss/reset/tailwind.css`) will not be injected even if this * option is `true`. * @default false */ injectReset?: string | boolean; /** * Inject UnoCSS entry import for every astro page * @default true */ injectEntry?: boolean | string; /** * Inject extra imports for every astro page * @default [] */ injectExtra?: string[]; } declare function UnoCSSAstroIntegration<Theme extends object>(options?: AstroIntegrationConfig<Theme>, defaults?: UserConfigDefaults): AstroIntegration; //#endregion export { AstroIntegrationConfig, UnoCSSAstroIntegration as default };