types(vite): add JSDoc documentation and examples to Vite PluginOptions

This commit is contained in:
abdelrhmanahmed 2026-09-27 01:53:44 +03:00
parent fa81d697fe
commit ce0bb58124

View file

@ -22,6 +22,22 @@ const INLINE_STYLE_ID_RE = /[?&]index=\d+\.css$/
export type PluginOptions = {
/**
* Optimize and minify the output CSS.
*
* @default true in production build, false in development
*
* @example
* ```ts
* import tailwindcss from '@tailwindcss/vite'
* import { defineConfig } from 'vite'
*
* export default defineConfig({
* plugins: [
* tailwindcss({
* optimize: { minify: true },
* }),
* ],
* })
* ```
*/
optimize?: boolean | { minify?: boolean }
}