Files
Wisecolt-CI/frontend/vite.config.ts
2025-11-27 18:56:28 +03:00

15 lines
435 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
const allowedHosts = process.env.ALLOWED_HOSTS?.split(",").map((h) => h.trim()).filter(Boolean);
export default defineConfig({
plugins: [react()],
server: {
port: 5173,
host: true,
// Env ile host kısıtı verilmişse uygula, yoksa tüm hostlara izin ver
...(allowedHosts?.length ? { allowedHosts } : { allowedHosts: true })
}
});