Files
hfb_jysh/frontend/vite.config.ts
T

28 lines
616 B
TypeScript

import { fileURLToPath, URL } from 'node:url'
import react from '@vitejs/plugin-react'
import { defineConfig } from 'vite'
const backendTarget = process.env.VITE_API_PROXY_TARGET || 'http://127.0.0.1:18089'
export default defineConfig({
plugins: [react()],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)),
},
},
server: {
port: Number(process.env.DEV_FRONTEND_PORT || 5289),
strictPort: true,
proxy: {
'/api': backendTarget,
'/r': backendTarget,
'/health': backendTarget,
},
},
build: {
chunkSizeWarningLimit: 700,
},
})