import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import path from 'node:path' export default defineConfig({ plugins: [vue()], resolve: { alias: { '@': path.resolve(__dirname, 'src') } }, server: { port: Number(process.env.VITE_PORT) || 5173, proxy: { '/api': { target: process.env.VITE_PB_URL || 'http://localhost:8090', changeOrigin: true, rewrite: (path) => path.replace(/^\/api/, '') } } } })