Skip to content

Commit

Permalink
docs: guide of extending vite config (#1874)
Browse files Browse the repository at this point in the history
Co-authored-by: Ctibor Laky <laky@efabrica.sk>
Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
  • Loading branch information
3 people committed Aug 23, 2022
1 parent b35f42d commit 4635c66
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docs/config/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,20 @@ export default defineConfig({
})
```

When using a separate `vitest.config.js`, you can also extend Vite's options from another config file if needed:

```ts
import { mergeConfig } from 'vite'
import { defineConfig } from 'vitest/config'
import viteConfig from './vite.config'

export default mergeConfig(viteConfig, defineConfig({
test: {
exclude: ['packages/template/*'],
},
}))
```

## Options

:::tip
Expand Down

0 comments on commit 4635c66

Please sign in to comment.