Skip to content

Commit

Permalink
docs: show usage with satisfies operator (#17643)
Browse files Browse the repository at this point in the history
  • Loading branch information
manbearwiz authored Jul 16, 2024
1 parent 93281b0 commit e1fb0fa
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion docs/config/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,15 @@ export default defineConfig({
})
```

Vite also directly supports TS config files. You can use `vite.config.ts` with the `defineConfig` helper as well.
Vite also supports TypeScript config files. You can use `vite.config.ts` with the `defineConfig` helper function above, or with the `satisfies` operator:

```ts
import type { UserConfig } from 'vite'

export default {
// ...
} satisfies UserConfig
```

## Conditional Config

Expand Down

0 comments on commit e1fb0fa

Please sign in to comment.