Skip to content

Commit 823d995

Browse files
docs(vite): add TypeScript configuration example to README
1 parent fd60994 commit 823d995

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

‎packages/@tailwindcss-vite/README.md‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,21 @@ export default defineConfig({
7474
],
7575
})
7676
```
77+
78+
### TypeScript Usage
79+
80+
When configuring Vite in TypeScript, `@tailwindcss/vite` provides both default and named exports, along with the `PluginOptions` type definition:
81+
82+
```ts
83+
import tailwindcss, { type PluginOptions } from '@tailwindcss/vite'
84+
import { defineConfig } from 'vite'
85+
86+
const options: PluginOptions = {
87+
optimize: { minify: true },
88+
}
89+
90+
export default defineConfig({
91+
plugins: [tailwindcss(options)],
92+
})
93+
```
94+

0 commit comments

Comments
 (0)