vantage-p2p/vite.config.ts
Bhanu Prakash Sai Potteri 447b2ec283 feat: retarget to dev app 519 + krishna-style API layer
APP_ID/ORG_ID -> 519/900000103 (all other uuids already match dev).
Runtime-config BASE_URL (config.js + SAME_ORIGIN, dev fallback), relative
vite base + BASE_HREF placeholder for the frontgen artifact contract.
API updates from krishna_sales: rdbms lookup via workflow_uuid + form_data,
values[] multi-filters, preset_alias, wf-lookup/dataset-options/me endpoints,
numeric org_id on login.
2026-08-19 12:56:46 +05:30

41 lines
1.2 KiB
TypeScript

import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import tailwindcss from '@tailwindcss/vite'
import { fileURLToPath, URL } from 'node:url'
const devTarget = 'https://dev.getzino.in'
const proxy = (target: string) => ({ target, changeOrigin: true, secure: false })
export default defineConfig({
plugins: [react(), tailwindcss()],
resolve: {
alias: { '@': fileURLToPath(new URL('./src', import.meta.url)) },
},
// Relative base so the built artifact is mount-path agnostic; the target
// frontgen writes the real <base href> into index.html at placement time.
base: './',
server: {
port: 3007,
proxy: {
// user-service
'/usr': proxy(devTarget),
'/login': proxy(devTarget),
'/apps': proxy(devTarget),
'/agents': proxy(devTarget),
// core-service
'/start': proxy(devTarget),
'/activity': proxy(devTarget),
'/instance': proxy(devTarget),
'/form': proxy(devTarget),
'/pa': proxy(devTarget),
// view-service (legacy)
'/recordview': proxy(devTarget),
'/detailview': proxy(devTarget),
'/audit': proxy(devTarget),
'/api-docs': proxy(devTarget),
// view-service (app-scoped)
'/app/': proxy(devTarget),
},
},
})