allow host

This commit is contained in:
Samandar Turgunboyev
2025-11-10 11:47:27 +05:00
parent cb033ba1be
commit 2a2e166477

View File

@@ -4,6 +4,8 @@ import path from "path";
import { defineConfig } from "vite"; import { defineConfig } from "vite";
import tsconfigPaths from "vite-tsconfig-paths"; import tsconfigPaths from "vite-tsconfig-paths";
const allowedHost = process.env.VITE_ALLOWED_HOST || "admin.simpletravel.uz";
export default defineConfig({ export default defineConfig({
plugins: [ plugins: [
react(), // React uchun react(), // React uchun
@@ -20,9 +22,9 @@ export default defineConfig({
port: 5173, port: 5173,
}, },
preview: { preview: {
host: true, // Production (vite preview) uchun host: true,
port: 5263, port: 5263,
allowedHosts: ["admin.simpletravel.uz"], // ✅ bu yer muhim allowedHosts: [allowedHost],
}, },
build: { build: {