Files
nxxmdata/government-admin/vite.config.js

36 lines
736 B
JavaScript
Raw Normal View History

import { defineConfig } from 'vite'
2025-09-17 18:04:28 +08:00
import vue from '@vitejs/plugin-vue'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue()],
2025-10-11 08:53:47 +08:00
base: '/government/', // 设置基础路径
resolve: {
alias: {
'@': '/src',
'antd': 'ant-design-vue'
}
},
server: {
port: 3002,
proxy: {
'/api': {
target: 'http://localhost:5352', // 政府端后端服务地址
changeOrigin: true
2025-09-17 18:04:28 +08:00
}
}
2025-10-11 08:53:47 +08:00
},
build: {
outDir: 'dist',
assetsDir: 'assets',
sourcemap: false,
rollupOptions: {
output: {
manualChunks: {
vendor: ['vue', 'vue-router', 'ant-design-vue'],
echarts: ['echarts', 'vue-echarts']
}
}
}
2025-09-17 18:04:28 +08:00
}
})