import { Plugin } from 'vite'; /** Options for the {@link cssLoader} Vite plugin. */ type CssLoaderOptions = { /** * Minify emitted CSS artifacts during production builds. * Has no effect in dev mode (`vite serve`). * @default false */ minify?: boolean; }; /** * Vite plugin that transforms plain `.css` imports into `CssModule` objects. * * For each intercepted CSS file the plugin: * - Emits two pre-scoped CSS artifacts: `{stem}.scoped.css` (wrapped in `@scope`) * and `{stem}.tagged.css` (wrapped with an attribute selector). * - Returns a JS module whose default export is a `CssModule`: * an object mapping camelCase class names to their kebab-case originals, * with a non-enumerable `[cssArtifacts]` symbol property holding the * public URLs of the two emitted files. * * Imports with a query suffix (`?inline`, `?raw`, etc.) are passed through * unchanged so Vite's built-in handlers continue to work. * * Returns two plugins — pass the array directly to Vite's `plugins` option; * Vite flattens nested plugin arrays automatically. * * @example `vite.config.ts` * ```ts * import { cssLoader } from '@rooted/components/plugin' * export default defineConfig({ plugins: [cssLoader({ minify: true })] }) * ``` */ declare function cssLoader(options?: CssLoaderOptions): Plugin[]; export { type CssLoaderOptions, cssLoader };