diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts index b3e6b72..5740085 100644 --- a/frontend/vite.config.ts +++ b/frontend/vite.config.ts @@ -6,20 +6,24 @@ import vue from '@vitejs/plugin-vue' import VueDevTools from 'vite-plugin-vue-devtools' // https://vitejs.dev/config/ -export default defineConfig({ - plugins: [ - vue(), - VueDevTools(), - ], - resolve: { - alias: { - '@': fileURLToPath(new URL('./src', import.meta.url)), +export default defineConfig(({ mode }) => { + return { + plugins: [ + vue(), + VueDevTools(), + ], + resolve: { + alias: { + '@': fileURLToPath(new URL('./src', import.meta.url)), + }, }, - }, - // @ts-expect-error vitest - test: { - environment: 'jsdom', - exclude: [...configDefaults.exclude, 'e2e/*'], - root: fileURLToPath(new URL('./', import.meta.url)), - }, + test: { + environment: 'jsdom', + exclude: [...configDefaults.exclude, 'e2e/*'], + root: fileURLToPath(new URL('./', import.meta.url)), + }, + esbuild: { + drop: mode === 'production' ? ['console'] : [], + }, + } })