---
stable_id: skills/skills-sh-antfu-skills-vitest
type: skills
title: skills-sh-antfu-skills-vitest
summary: >-
  ---

  name: vitest-configuration

  description: Configure Vitest with vite.config.ts or vitest.config.ts

  ---

  # Configuration

  Vitest reads configuration from `vitest.config.ts` or `vite.config.ts`. It
  shares the same config format as Vite.

  ## Basic Setup

  ```ts

  // vitest.config.ts

  import { defineConfig } from 'vitest/config'
tags:
  - skills-sh
  - skills-sh-all-time
source_url: https://raw.githubusercontent.com/antfu/skills/HEAD/skills/vitest/references/core-config.md
license: ""
upstream_ref: https://skills.sh/antfu/skills/vitest
github_stars: 4218
github_forks: 211
github_is_organization: false
retrieved_at: 2026-06-11T08:33:22.575Z
content_sha256: 5fd3cf0983f203f14c4f4732dde0632c1d537241daa5cffea24f7e55712a6fb3
---
