[READ-ONLY] Mirror of https://github.com/vitest-dev/vitest. Next generation testing framework powered by Vite. vitest.dev
test testing-tools vite
12

Configure Feed

Select the types of activity you want to include in your feed.

docs: add example for merging vite config defined as a function (#3978)

authored by

Vincent François and committed by
GitHub
(Aug 24, 2023, 2:24 PM +0200) 7dac0594 e8f7b086

+15
+15
docs/config/index.md
··· 68 68 `mergeConfig` helper is availabe in Vitest since v0.30.0. You can import it from `vite` directly, if you use lower version. 69 69 ::: 70 70 71 + If your vite config is defined as a function, you can define the config like this: 72 + ```ts 73 + import { defineConfig, mergeConfig } from 'vitest/config' 74 + import viteConfig from './vite.config' 75 + 76 + export default defineConfig(configEnv => mergeConfig( 77 + viteConfig(configEnv), 78 + defineConfig({ 79 + test: { 80 + exclude: ['packages/template/*'], 81 + }, 82 + }) 83 + )) 84 + ``` 85 + 71 86 ## Options 72 87 73 88 :::tip