31 lines
733 B
TypeScript
31 lines
733 B
TypeScript
|
|
import { defineConfig } from "vite";
|
||
|
|
import react from "@vitejs/plugin-react-swc";
|
||
|
|
import path from "path";
|
||
|
|
import { componentTagger } from "lovable-tagger";
|
||
|
|
|
||
|
|
// https://vitejs.dev/config/
|
||
|
|
export default defineConfig(({ mode }) => ({
|
||
|
|
server: {
|
||
|
|
host: "::",
|
||
|
|
port: 8080,
|
||
|
|
hmr: {
|
||
|
|
overlay: false,
|
||
|
|
},
|
||
|
|
proxy: {
|
||
|
|
// Proxy API requests to bypass CORS during development
|
||
|
|
'/api': {
|
||
|
|
target: 'https://uat.eventifyplus.com',
|
||
|
|
changeOrigin: true,
|
||
|
|
secure: false,
|
||
|
|
rewrite: (path) => path,
|
||
|
|
},
|
||
|
|
},
|
||
|
|
},
|
||
|
|
plugins: [react(), mode === "development" && componentTagger()].filter(Boolean),
|
||
|
|
resolve: {
|
||
|
|
alias: {
|
||
|
|
"@": path.resolve(__dirname, "./src"),
|
||
|
|
},
|
||
|
|
},
|
||
|
|
}));
|