mirror of
https://github.com/p-box2025/P-BOX.git
synced 2026-05-07 04:35:44 +08:00
30 lines
526 B
TypeScript
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,
|
|
},
|
|
})
|