mirror of
https://github.com/tiennm99/goclaw.git
synced 2026-10-14 06:17:41 +00:00
35 lines
735 B
TypeScript
35 lines
735 B
TypeScript
import { defineConfig } from 'vite'
|
|
import react from '@vitejs/plugin-react'
|
|
import tailwindcss from '@tailwindcss/vite'
|
|
import path from 'path'
|
|
|
|
export default defineConfig({
|
|
plugins: [react(), tailwindcss()],
|
|
resolve: {
|
|
alias: {
|
|
'@': path.resolve(__dirname, './src'),
|
|
},
|
|
},
|
|
build: {
|
|
outDir: 'dist',
|
|
},
|
|
server: {
|
|
strictPort: true,
|
|
proxy: {
|
|
// Proxy API + WS calls to gateway in dev mode (avoids CORS)
|
|
'/v1': {
|
|
target: 'http://localhost:18790',
|
|
changeOrigin: true,
|
|
},
|
|
'/ws': {
|
|
target: 'ws://localhost:18790',
|
|
ws: true,
|
|
},
|
|
'/health': {
|
|
target: 'http://localhost:18790',
|
|
changeOrigin: true,
|
|
},
|
|
},
|
|
},
|
|
})
|