Files
mediaproc/ui/detection-app/vite.config.ts
buenosairesam d9e0794b83 fix vite resolution for soleprint-ui deps; align kind template
- vite: alias @vue-flow/core and uplot to detection-app's node_modules
  so they resolve when imported through the symlinked soleprint-ui
  framework (Vite follows the symlink and would otherwise look up
  from ui/framework/, where node_modules doesn't exist)
- kind-config.yaml.tpl: match the new port layout (gateway on 30080
  via 127.0.0.1, redis on 6382), avoiding port-80 conflict with Caddy;
  keeps the extraMount for /mnt/media so MinIO can seed from host
2026-04-29 06:11:40 -03:00

34 lines
1016 B
TypeScript

import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { resolve } from 'path'
export default defineConfig({
plugins: [vue()],
base: '/detection/',
resolve: {
alias: {
'@': resolve(__dirname, 'src'),
'@common': resolve(__dirname, '../common'),
// soleprint-ui is symlinked (link:../framework). Vite follows the symlink
// and resolves its bare imports from ui/framework/, where node_modules
// doesn't exist. Pin the framework's runtime deps to this app's deps.
'@vue-flow/core': resolve(__dirname, 'node_modules/@vue-flow/core'),
'uplot': resolve(__dirname, 'node_modules/uplot'),
},
},
server: {
port: 5175,
allowedHosts: ['mpr.local.ar', 'k8s.mpr.local.ar'],
hmr: {
// When behind a reverse proxy, connect WebSocket to the same host the page was loaded from
clientPort: 80,
},
proxy: {
'/api': {
target: 'http://localhost:8702',
changeOrigin: true,
},
},
},
})