vue-vben-admin/apps/web-antd/vite.config.mts
vertoryao a08474d32c refactor(@vben/web-antd): 优化文档预览功能
- 修改 PPT 和 Word 预览组件的样式和背景色
- 更新 PPT 和 Word 文件的请求路径
- 调整 Vite 配置,增加对文档文件的代理支持
2025-05-06 10:28:44 +08:00

36 lines
971 B
TypeScript

import { defineConfig } from '@vben/vite-config';
export default defineConfig(async () => {
return {
application: {},
vite: {
server: {
proxy: {
'/api': {
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, ''),
// mock代理目标地址
target: 'http://localhost:8081/api',
ws: true,
},
'/docx': {
changeOrigin: true,
rewrite: (path) => path.replace(/^\/docx/, ''),
target: 'http://47.112.173.8:6805/static',
},
'/pptx': {
changeOrigin: true,
rewrite: (path) => path.replace(/^\/pptx/, ''),
target: 'http://47.112.173.8:6802/static',
},
'/v1': {
changeOrigin: true,
rewrite: (path) => path.replace(/^\/v1/, ''),
target: 'http://localhost:8081/v1',
},
},
},
},
};
});