reuse vite.config in vitest.config

This commit is contained in:
Ulf Gebhardt 2023-11-16 12:55:29 +01:00
parent e6f34c0a81
commit 6fbce556a7
Signed by: ulfgebhardt
GPG Key ID: DA6B843E748679C9

View File

@ -1,7 +1,10 @@
import vue from '@vitejs/plugin-vue' // Import the plugin here import { defineConfig, mergeConfig } from 'vitest/config'
import { defineConfig } from 'vitest/config'
export default defineConfig({ import viteConfig from './vite.config'
export default mergeConfig(
viteConfig,
defineConfig({
test: { test: {
globals: true, globals: true,
environment: 'jsdom', environment: 'jsdom',
@ -14,5 +17,5 @@ export default defineConfig({
}, },
*/ */
}, },
plugins: [vue()], // Include it in your array of plugins here }),
}) )