Files
nl-um-vue-ts/vite.config.ts

37 lines
781 B
TypeScript
Raw Permalink Normal View History

2025-12-03 12:56:57 +08:00
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { resolve } from 'path'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue()],
resolve: {
alias: {
'@': resolve(__dirname, 'src'),
},
},
server: {
port: 3000,
proxy: {
'/api': {
2026-07-08 08:17:58 +08:00
target: 'http://localhost:12080',
// target: 'https://g-ws.nailaoyun.cn',
2025-12-03 12:56:57 +08:00
changeOrigin: true,
},
'/ws': {
2026-07-08 08:17:58 +08:00
target: 'ws://localhost:12080',
// target: 'wss://g-ws.nailaoyun.cn',
2025-12-03 12:56:57 +08:00
ws: true,
changeOrigin: true,
},
2025-12-08 10:18:50 +08:00
'/upload': {
2026-07-08 08:17:58 +08:00
target: 'http://localhost:12080',
// target: 'https://g-ws.nailaoyun.cn',
2025-12-08 10:18:50 +08:00
ws: true,
changeOrigin: true,
},
2025-12-03 12:56:57 +08:00
},
},
})