35 lines
985 B
TypeScript
35 lines
985 B
TypeScript
import { defineConfig } from 'vitest/config'
|
|
import react from '@vitejs/plugin-react'
|
|
import tailwindcss from '@tailwindcss/vite'
|
|
import path from 'path'
|
|
import { version } from './package.json'
|
|
|
|
export default defineConfig({
|
|
base: './',
|
|
define: {
|
|
__APP_VERSION__: JSON.stringify(version),
|
|
},
|
|
plugins: [react(), tailwindcss()],
|
|
resolve: {
|
|
alias: {
|
|
'@': path.resolve(__dirname, './src'),
|
|
},
|
|
},
|
|
server: {
|
|
// Same-origin proxy to the local Stalwart container: avoids CORS entirely
|
|
// (VITE_API_BASE_URL stays empty in .env.development.local).
|
|
proxy: {
|
|
'/api': { target: 'http://localhost:8080', changeOrigin: true, ws: true },
|
|
'/jmap': { target: 'http://localhost:8080', changeOrigin: true, ws: true },
|
|
},
|
|
watch: {
|
|
// Release artifacts lock on Windows and crash the watcher (EBUSY).
|
|
ignored: ['**/webui.zip', '**/release_body.md'],
|
|
},
|
|
},
|
|
test: {
|
|
globals: false,
|
|
environment: 'happy-dom',
|
|
},
|
|
})
|