mirror of
https://github.com/siteboon/claudecodeui.git
synced 2025-12-08 21:29:38 +00:00
25 lines
590 B
JavaScript
Executable File
25 lines
590 B
JavaScript
Executable File
import { defineConfig, loadEnv } from 'vite'
|
|
import react from '@vitejs/plugin-react'
|
|
|
|
export default defineConfig(({ command, mode }) => {
|
|
// Load env file based on `mode` in the current working directory.
|
|
const env = loadEnv(mode, process.cwd(), '')
|
|
|
|
|
|
return {
|
|
plugins: [react()],
|
|
server: {
|
|
port: parseInt(env.VITE_PORT) || 3001,
|
|
proxy: {
|
|
'/api': `http://localhost:${env.PORT || 3002}`,
|
|
'/ws': {
|
|
target: `ws://localhost:${env.PORT || 3002}`,
|
|
ws: true
|
|
}
|
|
}
|
|
},
|
|
build: {
|
|
outDir: 'dist'
|
|
}
|
|
}
|
|
}) |