Files
P-BOX/frontend/vite.config.ts
p-box2026 c45916fc52 2026/1/11
2026-01-11 20:07:10 +08:00

30 lines
526 B
TypeScript

import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import path from 'path'
export default defineConfig({
plugins: [react()],
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
},
},
server: {
port: 5174,
proxy: {
'/api': {
target: 'http://127.0.0.1:8383',
changeOrigin: true,
},
'/ws': {
target: 'ws://127.0.0.1:8383',
ws: true,
},
},
},
build: {
outDir: 'dist',
sourcemap: false,
},
})