import { type ServerOptions } from 'vite'; export const serverOptions = () => { const options: ServerOptions = { port: 6261, host: '0.0.0.0', open: true, cors: true, proxy: { '/api': { target: process.env.BUNNY_APP_URL, changeOrigin: true, rewrite: (path: string) => path.replace(/^\/api/, '/api'), }, '/mock': { target: process.env.BUNNY_APP_URL, changeOrigin: true, rewrite: (path: string) => path.replace(/^\/mock/, '/mock'), }, }, }; return options; };