2b91f31807
- Skip NodeModal on double-click for 'group'/'groupRect' (use inline rename) - Exempt 'group' from properties-clears-height rule in updateNode (was collapsing group + hiding children with extent: 'parent') - Enable ws: true on Vite /api proxy so /api/v1/status/ws/status upgrades (status bubbles stayed grey because WS handshake failed) - Add regression tests for group/groupRect height preservation
43 lines
951 B
TypeScript
43 lines
951 B
TypeScript
import fs from 'fs'
|
|
import path from 'path'
|
|
import { defineConfig } from 'vitest/config'
|
|
import react from '@vitejs/plugin-react'
|
|
import tailwindcss from '@tailwindcss/vite'
|
|
|
|
const appVersion = fs.readFileSync(path.resolve(__dirname, '../VERSION'), 'utf-8').trim()
|
|
|
|
export default defineConfig({
|
|
define: {
|
|
__APP_VERSION__: JSON.stringify(appVersion),
|
|
},
|
|
plugins: [react(), tailwindcss()],
|
|
resolve: {
|
|
alias: {
|
|
'@': path.resolve(__dirname, './src'),
|
|
},
|
|
},
|
|
test: {
|
|
environment: 'jsdom',
|
|
globals: true,
|
|
setupFiles: ['./src/test/setup.ts'],
|
|
coverage: {
|
|
provider: 'v8',
|
|
reporter: ['text', 'lcov'],
|
|
exclude: ['src/components/ui/**', 'src/test/**'],
|
|
},
|
|
},
|
|
server: {
|
|
proxy: {
|
|
'/api': {
|
|
target: 'http://localhost:8000',
|
|
changeOrigin: true,
|
|
ws: true,
|
|
},
|
|
'/ws': {
|
|
target: 'ws://localhost:8000',
|
|
ws: true,
|
|
},
|
|
},
|
|
},
|
|
})
|