import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' import { fileURLToPath } from 'node:url' const p = (rel: string) => fileURLToPath(new URL(rel, import.meta.url)) export default defineConfig({ base: './', plugins: [react()], resolve: { alias: { '@sims/domain': p('../../packages/domain/src/index.ts'), '@sims/ui': p('../../packages/ui/src/index.ts'), }, }, // 5182 = apps/hq server (5181 store-server, 5180 backoffice dev). /share is the public // document-view route (served by the hq server, outside /api) — proxied so a minted // link opens against the dev origin exactly as it will in production (one origin). server: { port: 5183, proxy: { '/api': 'http://localhost:5182', '/share': 'http://localhost:5182' } }, })