import { defineConfig,loadEnv } from 'vite' import vue from '@vitejs/plugin-vue' import path from "path"; // https://vitejs.dev/config/ export default ({mode})=>defineConfig({ base:loadEnv(mode, process.cwd()).VITE_APP_BASE_URL, plugins: [ vue() ], resolve: { alias: { "@": path.resolve(__dirname, "./src"), }, }, build:{ outDir:loadEnv(mode, process.cwd()).VITE_APP_OUTDIR }, server:{ host:'0.0.0.0', proxy: { '/api': { // target: 'http://8.136.199.33:8608', target: 'http://gnetareport.hzinsights.com/ybreport', changeOrigin: true, rewrite: (path) => path.replace(/^\/api/, '/api') } }, } })