From 3a64366ab85277ad348908140a754169c10fc672 Mon Sep 17 00:00:00 2001 From: Hunter Richardson Date: Tue, 23 Jul 2024 18:53:58 -0500 Subject: [PATCH] Correct vite issues --- vite.ts | 24 ------------------------ vitest.config.ts | 33 ++++++++++++++++++++------------- 2 files changed, 20 insertions(+), 37 deletions(-) delete mode 100644 vite.ts diff --git a/vite.ts b/vite.ts deleted file mode 100644 index add6ebf..0000000 --- a/vite.ts +++ /dev/null @@ -1,24 +0,0 @@ -import vue from '@vitejs/plugin-vue'; -import vueJsx from '@vitejs/plugin-vue-jsx'; -import { fileURLToPath, URL } from 'node:url'; -import { defineConfig } from 'vite'; -import checker from 'vite-plugin-checker'; -import VueDevTools from 'vite-plugin-vue-devtools'; - -// https://vitejs.dev/config/ -/** @type {import ('vite').UserConfig} */ -export default defineConfig({ - plugins: [ - checker({ - typescript: true - }), - vue(), - vueJsx(), - VueDevTools(), - ], - resolve: { - alias: { - '@': fileURLToPath(new URL('./src', import.meta.url)) - } - } -}); diff --git a/vitest.config.ts b/vitest.config.ts index 5c4dec1..d555549 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -1,14 +1,21 @@ -import { fileURLToPath } from 'node:url'; -import { configDefaults, defineConfig, mergeConfig } from 'vitest/config'; -import viteConfig from './vite.ts'; +import vue from '@vitejs/plugin-vue'; +import vueJsx from '@vitejs/plugin-vue-jsx'; +import { fileURLToPath, URL } from 'node:url'; +import checker from 'vite-plugin-checker'; +import VueDevTools from 'vite-plugin-vue-devtools'; +import { configDefaults, defineConfig } from 'vitest/config'; -export default mergeConfig( - viteConfig, - defineConfig({ - test: { - environment: 'jsdom', - exclude: [...configDefaults.exclude, 'e2e/**'], - root: fileURLToPath(new URL('./', import.meta.url)) - } - }) -) +// https://vitejs.dev/config/ +/** @type {import ('vite').UserConfig} */ +export default defineConfig({ + plugins: [ + checker({ typescript: true }), + vue(), vueJsx(), VueDevTools(), + ], resolve: { + alias: { '@': fileURLToPath(new URL('./src', import.meta.url)) } + }, test: { + environment: 'jsdom', + exclude: [ ...configDefaults.exclude, 'e2e/**' ], + root: fileURLToPath(new URL('./', import.meta.url)) + } +});