···123123If you are already using Vite, add `test` property in your Vite config. You'll also need to add a reference to Vitest types using a [triple slash directive](https://www.typescriptlang.org/docs/handbook/triple-slash-directives.html#-reference-types-) at the top of your config file.
124124125125```ts [vite.config.ts]
126126-/// <reference types="vitest" />
127127-import { defineConfig } from 'vite'
128128-129129-export default defineConfig({
130130- test: {
131131- // ...
132132- },
133133-})
134134-```
135135-136136-The `<reference types="vitest" />` will stop working in the next major update, but you can start migrating to `vitest/config` in Vitest 2.1:
137137-138138-```ts [vite.config.ts]
139126/// <reference types="vitest/config" />
140127import { defineConfig } from 'vite'
141128142129export default defineConfig({
143130 test: {
144144- // ... Specify options here.
131131+ // ...
145132 },
146133})
147134```