/* * @Description: * @FilePath: \base-framework\apps\finance\vite.config.ts * @Author: freud * @Date: 2023-06-06 14:37:45 * @LastEditTime: 2023-11-13 10:25:00 * @LastEditors: freud * @Reference: */ import { defineApplicationConfig, generateModifyVars } from '@eciol/vite-config'; export default defineApplicationConfig({ overrides: { optimizeDeps: { include: [ 'ant-design-vue/es/locale/zh_CN', 'ant-design-vue/es/locale/en_US', 'dayjs', 'lodash-es', 'vue-router', '@vueuse/core', '@eciol/assets', '@eciol/design', '@eciol/types', 'xe-utils', 'sortablejs', '@vue-office/pdf', ], }, build: { rollupOptions: { external: ['echarts'], output: { manualChunks: { 'vue-office': ['@vue-office/pdf'], }, }, }, }, css: { preprocessorOptions: { less: { modifyVars: generateModifyVars('#3c6cfe'), javascriptEnabled: true, }, }, }, server: { port: 8082, proxy: { '/basic-api': { target: 'http://erpapi.eciol-dev.com', // target: 'http://192.168.24.87:9999', // howe location // target: 'http://192.168.9.177:9999', // hain location changeOrigin: true, ws: true, rewrite: (path) => path.replace(/^\/basic-api/, ''), // only https // secure: false }, '/upload': { target: 'http://files.eciol-dev.com', changeOrigin: true, ws: true, rewrite: (path) => path.replace(/^\/upload/, ''), }, '/finance-api': { target: 'http://biz2.eciol-dev.com', changeOrigin: true, ws: true, rewrite: (path) => path.replace(/^\/finance-api/, ''), // only https // secure: false }, }, }, }, });