| | |
| | | * @Author: shuishen 1109946754@qq.com |
| | | * @Date: 2024-10-25 10:56:27 |
| | | * @LastEditors: shuishen 1109946754@qq.com |
| | | * @LastEditTime: 2024-11-12 14:02:19 |
| | | * @LastEditTime: 2024-12-03 13:42:55 |
| | | * @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' |
| | | import viteCompression from 'vite-plugin-compression' |
| | | // import vueDevTools from 'vite-plugin-vue-devtools' |
| | | |
| | | export default ({ mode, command }) => { |
| | | const env = loadEnv(mode, process.cwd()) |
| | |
| | | basicSsl(), |
| | | AutoImport({ |
| | | imports: ["vue", "vue-router"], // 自动导入vue和vue-router相关函数 |
| | | }) |
| | | }), |
| | | viteCompression({ |
| | | filter: /\.(js|css|json|txt|ico|svg)(\?.*)?$/i, // 需要压缩的文件 |
| | | threshold: 1024, // 文件容量大于这个值进行压缩 |
| | | algorithm: 'gzip', // 压缩方式 |
| | | ext: 'gz', // 后缀名 |
| | | deleteOriginFile: false, // 压缩后是否删除压缩源文件 |
| | | }), |
| | | // vueDevTools() |
| | | ], |
| | | |
| | | css: { |
| | |
| | | // overlay:false |
| | | // }, |
| | | proxy: { |
| | | '/zhyq3Dtile': { |
| | | // target: 'http://localhost', |
| | | target: 'https://wrj.shuixiongit.com/zhyq3Dtile', |
| | | changeOrigin: true, |
| | | rewrite: path => path.replace(/^\/zhyq3Dtile/, ''), |
| | | }, |
| | | |
| | | '/panorama': { |
| | | // target: 'http://localhost', |
| | | target: 'http://vr.jxpskj.com:180', |
| | |
| | | rewrite: path => path.replace(/^\/panorama/, ''), |
| | | }, |
| | | |
| | | '/zhyq/mx': { |
| | | '/zhyq/newMx': { |
| | | // target: 'http://localhost', |
| | | target: 'https://wrj.shuixiongit.com/zhyq/mx', |
| | | target: 'https://wrj.shuixiongit.com/zhyq/newMx', |
| | | changeOrigin: true, |
| | | rewrite: path => path.replace(/^\/zhyq\/mx/, ''), |
| | | rewrite: path => path.replace(/^\/zhyq\/newMx/, ''), |
| | | }, |
| | | |
| | | // '/zhyq/mx': { |
| | | // // target: 'http://localhost', |
| | | // target: 'https://wrj.shuixiongit.com/zhyq/mx', |
| | | // changeOrigin: true, |
| | | // rewrite: path => path.replace(/^\/zhyq\/mx/, ''), |
| | | // }, |
| | | |
| | | '/zhyqapi': { |
| | | // target: 'http://localhost:8082', |
| | | target: 'https://wrj.shuixiongit.com/zhyqapi', |