25 أسطر
628 B
TypeScript
25 أسطر
628 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,
|
|
proxy: {
|
|
'/api': {
|
|
target: 'http://localhost:3001', // Updated to match the new server port
|
|
changeOrigin: true,
|
|
secure: false,
|
|
}
|
|
}
|
|
},
|
|
plugins: [react(), mode === "development" && componentTagger()].filter(Boolean),
|
|
resolve: {
|
|
alias: {
|
|
"@": path.resolve(__dirname, "./src"),
|
|
},
|
|
},
|
|
})); |