You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
sims-hq/apps/hq-web/vite.config.ts

22 lines
854 B
TypeScript

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'),
'@sims/printing': p('../../packages/printing/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' } },
})