import { fileURLToPath, URL } from 'node:url' import { defineConfig, loadEnv } from 'vite' import vue from '@vitejs/plugin-vue' import vueDevTools from 'vite-plugin-vue-devtools' // https://vite.dev/config/ export default defineConfig(({ mode }) => { // eslint-disable-next-line no-undef const env = loadEnv(mode, process.cwd()) console.log(env, 7777) return { base: env.VITE_PUBLIC_PATH || '/', plugins: [ vue(), ], resolve: { alias: { '@': fileURLToPath(new URL('./src', import.meta.url)) }, }, server: { host: '0.0.0.0', port: 5200, open: true, proxy: { '/hyb': { target: env.VITE_PROXY_TARGET, changeOrigin: true, }, }, }, } })