| | |
| | | import createVitePlugins from './vite/plugins' |
| | | import postCssPxToRem from 'postcss-pxtorem' |
| | | import { fileURLToPath, URL } from "node:url" |
| | | |
| | | import basic from '@vitejs/plugin-basic-ssl' |
| | | import fs from 'fs' |
| | | |
| | | // https://vitejs.dev/config/ |
| | |
| | | const { |
| | | VITE_APP_ENV, |
| | | VITE_APP_BASE, |
| | | VITE_APP_XT_URL, |
| | | VITE_APP_API_URL, |
| | | VITE_APP_XT_URL, |
| | | VITE_APP_RECTANGLE, |
| | | VITE_APP_ARCGIS_URL, |
| | | VITE_APP_MAP_TILE_URL, |
| | |
| | | // key: fs.readFileSync('./127.0.0.1+3-key.pem'), // 私钥路径 |
| | | // cert: fs.readFileSync('./127.0.0.1+3.pem'), // 证书路径 |
| | | // }, |
| | | https: true, |
| | | port: 5179, |
| | | proxy: { |
| | | '/aisky-webodm-vol': { |
| | |
| | | rewrite: path => path.replace(/^\/dji_in_rectangle/, ''), |
| | | }, |
| | | |
| | | '/api': { |
| | | '/webservice': { |
| | | target: VITE_APP_XT_URL, |
| | | changeOrigin: true, |
| | | rewrite: path => path.replace(/^\/webservice/, '/webservice'), |
| | | }, |
| | | |
| | | '/api': { |
| | | target: VITE_APP_API_URL, |
| | | changeOrigin: true, |
| | | rewrite: path => path.replace(/^\/api/, ''), |
| | | } |
| | |
| | | ] |
| | | } |
| | | }, |
| | | plugins: createVitePlugins(env, command === 'build'), |
| | | plugins: [...createVitePlugins(env, command === 'build'), basic()], |
| | | // plugins: createVitePlugins(env, command === 'build'), |
| | | build: buildConfig, |
| | | optimizeDeps: { |
| | | esbuildOptions: { |