/* * @Description: * @FilePath: \base-framework\apps\starter-template\vite.config.ts * @Author: freud * @Date: 2023-06-06 14:37:45 * @LastEditTime: 2024-02-18 11:10:01 * @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', ], holdUntilCrawlEnd: false, }, css: { preprocessorOptions: { less: { modifyVars: generateModifyVars('#3c6cfe'), javascriptEnabled: true, }, }, }, server: { warmup: { clientFiles: ['./index.html', './src/{views,components,utils}/*'], }, // open: 'http://freud.eciol-dev.com:8082', port: 8082, proxy: { '/basic-api': { target: 'http://erpapi.eciol-dev.com', // target: 'http://192.168.9.243:9999', // cooper 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 }, }, }, }, });