无人机管理后台前端(已迁走)
shuishen
2025-06-17 2572e4c8e8d30fee0a281b39990b9c75387a5f3e
chore:配置文件调整
2 files modified
20 ■■■■■ changed files
.env.development 5 ●●●●● patch | view | raw | blame | history
vite.config.mjs 15 ●●●●● patch | view | raw | blame | history
.env.development
@@ -10,9 +10,8 @@
VITE_APP_BASE=/manage
# 服务地址
VITE_APP_URL = https://wrj.shuixiongit.com/api
#VITE_APP_URL= http://192.168.1.168 rjg
#VITE_APP_URL= http://192.168.1.33
VITE_APP_URL = http://192.168.1.227:5174
#新大屏地址
VITE_APP_DASHBOARD_URL = 'https://wrj.shuixiongit.com/command-center-dashboard/'
vite.config.mjs
@@ -9,6 +9,15 @@
  // 判断是打生产环境包
  const isProd = VITE_APP_ENV === 'production'
  const mapApi = VITE_APP_ENV === 'development' ? {
    target: VITE_APP_URL,
    changeOrigin: true,
  } : {
    target: VITE_APP_URL,
    changeOrigin: true,
    rewrite: path => path.replace(/^\/api/, ''),
  }
  // 根据是否生产环境,动态设置压缩配置
  const buildConfig = {
    outDir: 'manage',
@@ -39,11 +48,7 @@
      port: 5174,
      // host: '192.168.1.178',
      proxy: {
        '/api': {
          target: VITE_APP_URL,
          changeOrigin: true,
          rewrite: path => path.replace(/^\/api/, ''),
        },
        '/api': mapApi
      },
    },
    resolve: {