import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' import tailwindcss from '@tailwindcss/vite' export default defineConfig({ // Set VITE_BASE_PATH=/medical-centers/no-physiotherapy/ when the site is // mounted on a sub-path, so asset URLs in the built HTML resolve against it. base: process.env.VITE_BASE_PATH ?? '/', plugins: [react(), tailwindcss()], build: { outDir: 'dist/client', emptyOutDir: true, assetsInlineLimit: 0, }, server: { // 5173/3000 and 5174/3001 belong to the fitnes/medcenter and hotel // landings, so all of them can run side by side. port: 5175, proxy: { '/api': { target: 'http://localhost:3003', changeOrigin: true }, }, }, })