- 新增 address/admin/favorite/review API 模块 - 更新已有 API 模块适配后端接口变更 - 新增 admin 类型定义和工具函数 - 添加静态资源文件 - 更新路由配置和守卫逻辑 - 更新 Vite 配置和依赖锁文件
47 lines
1.0 KiB
TypeScript
47 lines
1.0 KiB
TypeScript
import { defineConfig } from 'vite'
|
|
import vue from '@vitejs/plugin-vue'
|
|
import path from 'path'
|
|
|
|
export default defineConfig({
|
|
plugins: [vue()],
|
|
resolve: {
|
|
alias: {
|
|
'@': path.resolve(__dirname, 'src'),
|
|
},
|
|
},
|
|
server: {
|
|
port: 3000,
|
|
proxy: {
|
|
'/api': {
|
|
target: 'http://localhost:8080',
|
|
changeOrigin: true,
|
|
rewrite: (proxyPath) => proxyPath.replace(/^\/api/, '/api'),
|
|
},
|
|
'/images': {
|
|
target: 'http://localhost:8080',
|
|
changeOrigin: true,
|
|
},
|
|
'/uploads': {
|
|
target: 'http://localhost:8080',
|
|
changeOrigin: true,
|
|
},
|
|
'/static': {
|
|
target: 'http://localhost:8080',
|
|
changeOrigin: true,
|
|
},
|
|
},
|
|
},
|
|
build: {
|
|
rollupOptions: {
|
|
output: {
|
|
manualChunks: {
|
|
vendor: ['vue', 'vue-router', 'pinia'],
|
|
element: ['element-plus', '@element-plus/icons-vue'],
|
|
utils: ['axios', 'dayjs', '@vueuse/core'],
|
|
charts: ['echarts', 'vue-echarts'],
|
|
},
|
|
},
|
|
},
|
|
},
|
|
})
|