docs(vite): add TypeScript configuration example to README

This commit is contained in:
abdelrhmanahmed 2026-09-27 02:10:42 +03:00
parent fd60994b5a
commit 823d99541b

View file

@ -74,3 +74,21 @@ export default defineConfig({
],
})
```
### TypeScript Usage
When configuring Vite in TypeScript, `@tailwindcss/vite` provides both default and named exports, along with the `PluginOptions` type definition:
```ts
import tailwindcss, { type PluginOptions } from '@tailwindcss/vite'
import { defineConfig } from 'vite'
const options: PluginOptions = {
optimize: { minify: true },
}
export default defineConfig({
plugins: [tailwindcss(options)],
})
```