UNPKG

vite-plugin-dynamic-sass-themes

Version:

A Vite plugin for dynamically compiling and applying SASS themes in your Vite project. This plugin allows you to manage multiple SASS themes, compile them on-the-fly, and dynamically update the styles in the browser without a full page reload.

20 lines (19 loc) 806 B
import { Options } from "sass"; import { Plugin } from "vite"; interface DynamicSassThemePluginOptions { /** Directory containing theme SASS files (relative path). Default: `"src/themes"` */ themesDir?: string; /** Output directory for compiled CSS (relative path). Default: `"public/themes"` */ outputDir?: string; /** Enable/disable logging. Default: `true` */ log?: boolean; /** Additional SASS options. Default: `{}` */ sassOptions?: Options<"sync">; } /** * A Vite plugin to dynamically compile and inject SASS themes. * @param {DynamicSassThemePluginOptions} options - Configuration options for the plugin. * @returns {Plugin} - A Vite plugin instance. */ export default function dynamicSassThemePlugin(options?: DynamicSassThemePluginOptions): Plugin; export {};