mosdns/web-ui/vite.config.ts
dengxiongjian ee06785e08
Some checks are pending
Test mosdns / build (push) Waiting to run
开发web管理
2025-10-15 22:20:27 +08:00

38 lines
749 B
TypeScript

import { fileURLToPath, URL } from 'node:url'
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue()],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)),
},
},
server: {
port: 5173,
proxy: {
'/api': {
target: 'http://localhost:5555',
changeOrigin: true,
},
},
},
build: {
outDir: 'dist',
assetsDir: 'static',
rollupOptions: {
output: {
manualChunks(id) {
// 将所有 node_modules 的依赖打包到 vendor
if (id.includes('node_modules')) {
return 'vendor'
}
},
},
},
},
})