Skip to content

Commit

Permalink
fix: work around vitest mergeConfig/defineConfig type issues
Browse files Browse the repository at this point in the history
Until vitest-dev/vitest#3804 is merged and
released, we can work around the issue by using the exports from `vite`,
they are identical anyway.

In later versions, we should import both `mergeConfig` and
`defineConfig` from `vitest`, though, to better align with their
official documentation.

Fixes #313
Fixes #317
  • Loading branch information
haoqunjiang committed Jul 24, 2023
1 parent f0e47a6 commit b948832
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions template/config/vitest/vitest.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { fileURLToPath } from 'node:url'
import { mergeConfig } from 'vite'
import { configDefaults, defineConfig } from 'vitest/config'
import { mergeConfig, defineConfig } from 'vite'
import { configDefaults } from 'vitest/config'
import viteConfig from './vite.config'

export default mergeConfig(
Expand Down

0 comments on commit b948832

Please sign in to comment.