baoshiwei
2025-05-24 3ad537052477fe31f45bd2e16045d58b35713bdc
zhitan-vue/vite.config.js
@@ -4,7 +4,7 @@
// https://vitejs.dev/config/
export default defineConfig(({ mode, command }) => {
  mode = "production"
  mode = "development"
  const env = loadEnv(mode, process.cwd())
  console.log(mode, "==========env")
  const { VITE_APP_ENV } = env
@@ -33,15 +33,15 @@
      proxy: {
        // https://cn.vitejs.dev/config/#server-proxy
        "/dev-api": {
          target: "https://demo-ems.zhitancloud.com",
          target: "http://localhost:8088",
          changeOrigin: true,
          rewrite: (p) => p.replace(/^\/dev-api/, "/prod-api"),
          rewrite: (p) => p.replace(/^\/dev-api/, "/"),
        },
        "/prod-api": {
          target: "https://demo-ems.zhitancloud.com",
          target: "http://localhost:8088",
          changeOrigin: true,
          secure: true,
        }
        },
      },
    },
    //fix:error:stdin>:7356:1: warning: "@charset" must be the first rule in the file