44 lines
935 B
TypeScript
44 lines
935 B
TypeScript
/// <reference types="vitest" />
|
|
// @ts-nocheck
|
|
|
|
import { defineConfig } from 'vite'
|
|
import react from '@vitejs/plugin-react'
|
|
import type { UserConfig as VitestUserConfig } from 'vitest/config'
|
|
|
|
// https://vite.dev/config/
|
|
const config: VitestUserConfig = {
|
|
plugins: [react()],
|
|
build: {
|
|
rollupOptions: {
|
|
output: {
|
|
manualChunks: {
|
|
'react-vendor': ['react', 'react-dom', 'react-router-dom'],
|
|
'ui-vendor': ['lucide-react', 'react-toastify'],
|
|
},
|
|
},
|
|
},
|
|
sourcemap: true,
|
|
},
|
|
test: {
|
|
environment: 'jsdom',
|
|
setupFiles: './vitest.setup.ts',
|
|
globals: true
|
|
},
|
|
server: {
|
|
port: 5173,
|
|
host: true,
|
|
proxy: {
|
|
'/api': {
|
|
target: 'http://localhost:3002',
|
|
changeOrigin: true,
|
|
},
|
|
'/photos': {
|
|
target: 'http://localhost:3002',
|
|
changeOrigin: true,
|
|
},
|
|
},
|
|
}
|
|
}
|
|
|
|
export default defineConfig(config as any)
|