| | |
| | | * @Author: shuishen 1109946754@qq.com |
| | | * @Date: 2024-10-25 10:56:27 |
| | | * @LastEditors: shuishen 1109946754@qq.com |
| | | * @LastEditTime: 2024-10-29 21:44:48 |
| | | * @LastEditTime: 2024-11-01 11:15:36 |
| | | * @FilePath: \bigScreen\vite.config.js |
| | | * @Description: |
| | | * |
| | |
| | | |
| | | import AutoImport from 'unplugin-auto-import/vite' |
| | | import basicSsl from '@vitejs/plugin-basic-ssl' |
| | | import { fa } from 'element-plus/es/locales.mjs' |
| | | |
| | | export default ({ mode, command }) => { |
| | | const env = loadEnv(mode, process.cwd()) |
| | |
| | | |
| | | // 根据是否生产环境,动态设置压缩配置 |
| | | const buildConfig = { |
| | | outDir: 'manage', |
| | | outDir: 'zhyq', |
| | | target: 'esnext', |
| | | minify: isProd ? 'terser' : 'esbuild', // 根据环境选择压缩工具 |
| | | } |
| | |
| | | port: 668, |
| | | https: true, |
| | | host: '0.0.0.0', |
| | | // hmr:{ |
| | | // overlay:false |
| | | // }, |
| | | proxy: { |
| | | '/api': { |
| | | '/zhyq/mx': { |
| | | // target: 'http://localhost', |
| | | target: 'https://wrj.shuixiongit.com/api', |
| | | target: 'https://wrj.shuixiongit.com/zhyq/mx', |
| | | changeOrigin: true, |
| | | rewrite: path => path.replace(/^\/api/, ''), |
| | | rewrite: path => path.replace(/^\/zhyq\/mx/, ''), |
| | | }, |
| | | |
| | | '/zhyqapi': { |
| | | // target: 'http://localhost', |
| | | target: 'https://wrj.shuixiongit.com/zhyqapi', |
| | | changeOrigin: true, |
| | | rewrite: path => path.replace(/^\/zhyqapi/, ''), |
| | | }, |
| | | }, |
| | | }, |