Files
simple-admin/vite.config.ts
2025-11-04 14:37:39 +03:00

34 lines
920 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 tailwindcss from "@tailwindcss/vite";
import react from "@vitejs/plugin-react";
import path from "path";
import { defineConfig } from "vite";
import tsconfigPaths from "vite-tsconfig-paths";
export default defineConfig({
plugins: [
react(), // React uchun
tailwindcss(), // Tailwind CSS integratsiyasi
tsconfigPaths(), // @ alias yollarini avtomatik oqish
],
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
},
},
server: {
host: true,
port: 5173,
},
preview: {
host: true, // Production (vite preview) uchun
port: 5263,
allowedHosts: ["admin.simpletravel.uz"], // ✅ bu yer muhim
},
build: {
outDir: "dist", // Vercel build chiqishini shu papkadan oladi
sourcemap: false, // Agar kerak bolmasa ochirib qoying
},
base: "/", // <— Muhim: nisbiy yol, Vercelda assetlar togri yuklanadi
});